/*
Theme Name: basebits
Theme URI: https://basebits.tech
Author: basebits
Description: Dunkles Shop-Theme mit Lichtkegel, schwebendem Staub und Einblend-Effekten für Specksteinpulver. Farben und Schriften stehen in theme.json (Design → Stile).
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: basebits
*/

/* =====================================================================
   Tipp: Farben und Schriften änderst du am einfachsten im WordPress-Admin
   unter Design → Editor → Stile. Hier stehen nur die besonderen Effekte.
   Eigene CSS-Klassen für Blöcke (Block → Erweitert → Zusätzliche CSS-Klassen):
     einblenden     Block blendet beim Runterscrollen weich ein
     start          großer Startbereich mit schwebendem Staub
     produkt-bereich  Abschnitt mit Lichtkegel
   ===================================================================== */

:root {
	--bb-linie: rgba(236, 235, 230, 0.11);
	--bb-licht: 240, 206, 108;
	--bb-radius: 18px;
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

:where(h1, h2, h3) {
	text-wrap: balance;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--akzent-hell);
	outline-offset: 3px;
}

.kicker {
	color: var(--wp--preset--color--akzent);
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.leise,
.klein {
	color: var(--wp--preset--color--text-leise);
}

.klein {
	font-size: 0.82rem;
}

/* ---------------------------------------------------------------------
   Kopfzeile
   --------------------------------------------------------------------- */

.kopf {
	position: relative;
	z-index: 20;
	padding: 18px clamp(16px, 4vw, 40px);
}

.home .kopf {
	position: fixed;
	inset: 0 0 auto 0;
	background: linear-gradient(to bottom, rgba(14, 16, 17, 0.9), rgba(14, 16, 17, 0));
}

.admin-bar.home .kopf {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.kopf .wp-block-site-title a {
	text-decoration: none;
}

.kopf-link .wp-block-button__link,
.is-style-outline > .wp-block-button__link {
	padding: 8px 18px;
	border: 1px solid var(--bb-linie);
	background: transparent;
	color: var(--wp--preset--color--text);
	font-size: 0.9rem;
	font-weight: 500;
	backdrop-filter: blur(8px);
}

.kopf-link .wp-block-button__link:hover,
.is-style-outline > .wp-block-button__link:hover {
	border-color: rgba(236, 235, 230, 0.35);
	background: rgba(236, 235, 230, 0.06);
	color: var(--wp--preset--color--text);
}

/* ---------------------------------------------------------------------
   Startseite: Abstände zwischen den großen Abschnitten
   --------------------------------------------------------------------- */

.startseite {
	margin: 0;
}

.startseite .wp-block-post-content > * {
	margin-block-start: 0;
}

/* ---------------------------------------------------------------------
   Startbereich mit schwebendem Staub
   --------------------------------------------------------------------- */

.start {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	padding-top: 120px !important;
	padding-bottom: 150px !important;
	overflow: hidden;
	background: radial-gradient(120% 80% at 50% 0%, #1b1f20 0%, var(--wp--preset--color--grund) 62%);
}

.start::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	z-index: -1;
	height: 35%;
	background: linear-gradient(to bottom, transparent, var(--wp--preset--color--grund));
	pointer-events: none;
}

.staub-leinwand {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.start h1 {
	margin-block: 0.2em 0;
}

.start .start-text {
	max-width: 580px;
	margin-inline: auto !important;
	margin-top: 1.6rem;
	color: var(--wp--preset--color--text-leise);
	font-size: clamp(1.02rem, 1.6vw, 1.18rem);
}

.js .start > :not(.staub-leinwand):not(.runter) {
	animation: bb-auftauchen 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.js .start > :nth-child(2) {
	animation-delay: 0.12s;
}

.js .start > :nth-child(3) {
	animation-delay: 0.28s;
}

@keyframes bb-auftauchen {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
}

.runter {
	position: absolute;
	bottom: 34px;
	left: 50%;
	margin: 0 !important;
	transform: translateX(-50%);
}

.runter a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	color: var(--wp--preset--color--text-leise);
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-decoration: none;
	text-transform: uppercase;
}

.runter a::after {
	content: "";
	display: block;
	width: 1px;
	height: 58px;
	background: linear-gradient(var(--wp--preset--color--akzent-hell), var(--wp--preset--color--akzent-hell)) 0 -30% / 1px 30% no-repeat,
		linear-gradient(to bottom, rgba(236, 235, 230, 0.45), transparent);
	animation: bb-tropfen 2.2s ease-in-out infinite;
}

@keyframes bb-tropfen {
	to {
		background-position: 0 130%, 0 0;
	}
}

/* ---------------------------------------------------------------------
   Produkt im Lichtkegel
   --------------------------------------------------------------------- */

.produkt-bereich {
	position: relative;
	isolation: isolate;
	padding-top: clamp(90px, 13vw, 170px) !important;
	padding-bottom: clamp(80px, 11vw, 140px) !important;
	overflow: hidden;
}

.produkt-bereich::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(32% 42% at 28% 52%, rgba(var(--bb-licht), 0.2), transparent 70%),
		conic-gradient(
			from 0deg at 28% -12%,
			transparent 0deg 160deg,
			rgba(var(--bb-licht), 0.07) 170deg,
			rgba(var(--bb-licht), 0.12) 180deg,
			rgba(var(--bb-licht), 0.07) 190deg,
			transparent 200deg 360deg
		);
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%);
	opacity: 0;
	transition: opacity 1.8s ease 0.2s;
}

.produkt-bereich.beleuchtet::before,
html:not(.js) .produkt-bereich::before {
	opacity: 1;
}

.produkt .wp-block-columns {
	gap: clamp(32px, 6vw, 88px);
}

.produkt-bild {
	position: relative;
}

.produkt-bild::before {
	content: "";
	position: absolute;
	inset: 12% 10% 6%;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(var(--bb-licht), 0.2), transparent);
	filter: blur(12px);
}

.produkt-bild img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--bb-radius);
}

.produkt-info .wp-block-post-title {
	margin-top: 0.3rem;
	font-size: clamp(2.3rem, 4.6vw, 3.5rem);
}

.produkt-info .wp-block-woocommerce-product-summary,
.produkt-info .wc-block-components-product-summary {
	color: var(--wp--preset--color--text-leise);
}

.produkt-info .wc-block-components-product-price,
.produkt-info .wp-block-woocommerce-product-price {
	font-family: var(--wp--preset--font-family--titel);
	font-size: clamp(2rem, 4vw, 2.6rem) !important;
	line-height: 1.15;
}

.produkt-info [class*="wp-block-woocommerce-gzd-product-"] {
	margin-block: 0.15rem !important;
	color: var(--wp--preset--color--text-leise);
	font-size: 0.88rem;
}

.produkt-info [class*="wp-block-woocommerce-gzd-product-"] a {
	color: inherit;
}

/* Datenblatt (Tabelle mit Körnung, Farbe, Herkunft) */
.wp-block-table.daten {
	margin-block: 1.6rem 0;
}

.wp-block-table.daten table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

.wp-block-table.daten td {
	padding: 10px 14px;
	border: 1px solid var(--bb-linie);
}

.wp-block-table.daten td:first-child {
	width: 38%;
	color: var(--wp--preset--color--text-leise);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Größen-Auswahl (Chips) */
.produkt-info .wp-block-woocommerce-add-to-cart-with-options {
	margin-top: 1.6rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--bb-linie);
}

.produkt-info .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name,
.produkt-info .wc-block-add-to-cart-with-options-variation-selector-attribute-name {
	color: var(--wp--preset--color--text-leise);
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.produkt-info .wc-block-product-filter-chips__items {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.produkt-info .wc-block-product-filter-chips__item {
	justify-content: center;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid var(--bb-linie);
	border-radius: 12px;
	background: rgba(236, 235, 230, 0.02);
	color: var(--wp--preset--color--text);
	font-weight: 650;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.produkt-info .wc-block-product-filter-chips__item:hover {
	border-color: rgba(236, 235, 230, 0.32);
}

.produkt-info .wc-block-product-filter-chips__item[aria-checked="true"],
.produkt-info .wc-block-product-filter-chips__item.is-selected {
	border-color: var(--wp--preset--color--akzent);
	background: rgba(188, 205, 191, 0.12);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--akzent);
	color: var(--wp--preset--color--text);
}

.produkt-info .wc-block-product-filter-chips__item[aria-disabled="true"],
.produkt-info .wc-block-product-filter-chips__item:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

/* Anzahl und Bestell-Knopf */
.produkt-info .wp-block-woocommerce-add-to-cart-with-options .wp-block-group {
	align-items: stretch;
	gap: 12px;
}

.produkt-info .wc-block-components-quantity-selector {
	border: 1px solid var(--bb-linie);
	border-radius: 999px;
	background: transparent;
}

.produkt-info .wc-block-components-quantity-selector::after {
	border: 0;
}

.produkt-info .wc-block-components-quantity-selector input,
.produkt-info .wc-block-components-quantity-selector button {
	color: var(--wp--preset--color--text);
	background: transparent;
}

.produkt-info .wp-block-woocommerce-product-button {
	flex: 1 1 200px;
}

.produkt-info .wp-block-woocommerce-product-button .wp-block-button__link,
.produkt-info .single_add_to_cart_button {
	width: 100%;
	min-height: 54px;
	box-shadow: 0 12px 44px -12px rgba(var(--bb-licht), 0.5);
	transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.produkt-info .wp-block-woocommerce-product-button .wp-block-button__link:hover:not([disabled]) {
	transform: translateY(-1px);
	box-shadow: 0 18px 54px -14px rgba(var(--bb-licht), 0.65);
}

.produkt-info .wp-block-button__link[disabled],
.produkt-info .wp-block-button__link.disabled,
.produkt-info .single_add_to_cart_button.disabled {
	cursor: not-allowed;
	opacity: 0.45;
	box-shadow: none;
}

.zahlung-hinweis {
	color: var(--wp--preset--color--text-leise);
	font-size: 0.86rem;
}

/* ---------------------------------------------------------------------
   Weitere Abschnitte
   --------------------------------------------------------------------- */

.abschnitt {
	padding-top: clamp(64px, 9vw, 120px) !important;
	padding-bottom: clamp(64px, 9vw, 120px) !important;
}

.abschnitt > .wp-block-heading {
	margin-top: 0.2rem;
	margin-bottom: clamp(30px, 5vw, 54px);
}

.karte,
.schritt {
	height: 100%;
	padding: 28px 24px !important;
	border: 1px solid var(--bb-linie);
	border-radius: var(--bb-radius);
	background: linear-gradient(180deg, rgba(236, 235, 230, 0.04), rgba(236, 235, 230, 0.01));
}

.schritt {
	border-width: 1px 0 0;
	border-radius: 0;
	background: none;
	padding-left: 0 !important;
}

.karte h3,
.schritt h3 {
	margin-bottom: 0.5rem;
}

.karte p,
.schritt p:not(.nummer) {
	color: var(--wp--preset--color--text-leise);
	font-size: 0.95rem;
}

.nummer {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--wp--preset--color--akzent);
	border-radius: 50%;
	color: var(--wp--preset--color--akzent);
	font-size: 0.9rem;
}

.hinweis-box {
	padding: clamp(28px, 4vw, 44px) !important;
	border: 1px solid rgba(188, 205, 191, 0.25);
	border-radius: var(--bb-radius);
	background: rgba(188, 205, 191, 0.05);
}

.hinweis-box h2 {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.hinweis-box ul {
	color: var(--wp--preset--color--text-leise);
}

.fragen {
	max-width: 820px;
}

.produkt-info ul.daten {
	margin: 1.2rem 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--bb-linie);
}

.produkt-info ul.daten li {
	padding: 8px 0;
	border-bottom: 1px solid var(--bb-linie);
	font-size: 0.95rem;
}

.produkt-info ul.daten strong {
	display: inline-block;
	min-width: 7.5rem;
	color: var(--wp--preset--color--text-leise);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.wp-block-details {
	padding: 0;
	border-bottom: 1px solid var(--bb-linie);
}

.wp-block-details + .wp-block-details {
	margin-top: 0 !important;
}

.fragen {
	border-top: 1px solid var(--bb-linie);
}

.wp-block-details summary {
	position: relative;
	padding: 20px 44px 20px 0;
	font-size: 1.08rem;
	list-style: none;
	cursor: pointer;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 6px;
	color: var(--wp--preset--color--akzent);
	font-size: 1.5rem;
	line-height: 1;
	transform: translateY(-50%);
	transition: transform 0.2s;
}

.wp-block-details[open] summary::after {
	transform: translateY(-50%) rotate(45deg);
}

.wp-block-details > :not(summary) {
	margin-top: 0;
	padding-bottom: 22px;
	color: var(--wp--preset--color--text-leise);
}

/* ---------------------------------------------------------------------
   Einblenden beim Scrollen
   --------------------------------------------------------------------- */

.js .einblenden {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .produkt.einblenden {
	transform: translateY(48px) scale(0.98);
	transition-duration: 1.3s;
}

.js .einblenden.sichtbar {
	opacity: 1;
	transform: none;
}

.js .einblenden.verzoegert-1 {
	transition-delay: 0.08s;
}

.js .einblenden.verzoegert-2 {
	transition-delay: 0.16s;
}

.js .einblenden.verzoegert-3 {
	transition-delay: 0.24s;
}

/* ---------------------------------------------------------------------
   Fußzeile, Unterseiten, Bald-Seite
   --------------------------------------------------------------------- */

.fuss {
	margin-top: 0;
	padding-top: 48px !important;
	padding-bottom: 40px !important;
	border-top: 1px solid var(--bb-linie);
}

.fuss .wp-block-site-title a {
	text-decoration: none;
}

.fuss-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 22px;
}

.fuss-links a {
	color: var(--wp--preset--color--text-leise);
	font-size: 0.9rem;
	text-decoration: none;
}

.fuss-links a:hover {
	color: var(--wp--preset--color--text);
}

.seite {
	min-height: 60vh;
	padding-top: clamp(48px, 8vw, 96px) !important;
	padding-bottom: 96px !important;
}

.seite > .wp-block-post-title {
	margin-bottom: 1.6rem;
	font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.seite .wp-block-post-content p,
.seite .wp-block-post-content li {
	color: var(--wp--preset--color--text-leise);
}

.platzhalter {
	padding: 20px 22px !important;
	border: 1px dashed rgba(236, 235, 230, 0.28);
	border-radius: 12px;
}

.mitte {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	background: radial-gradient(60% 50% at 50% 40%, rgba(var(--bb-licht), 0.09), transparent 70%);
}

.mitte h1 {
	font-size: clamp(2.5rem, 7vw, 4.6rem);
}

.mitte p {
	color: var(--wp--preset--color--text-leise);
}

.marke-gross a {
	font-size: 1.5rem;
	text-decoration: none;
}

/* WooCommerce: Warenkorb & Kasse auf dunklem Hintergrund */
.wc-block-components-sidebar-layout .wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-components-order-summary-item {
	border-color: var(--bb-linie) !important;
}

.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart {
	padding-top: clamp(32px, 6vw, 72px);
	padding-bottom: 72px;
}

/* ---------------------------------------------------------------------
   Handy & Tablet
   --------------------------------------------------------------------- */

@media (max-width: 781px) {
	.produkt-bereich::before {
		background:
			radial-gradient(60% 26% at 50% 22%, rgba(var(--bb-licht), 0.2), transparent 70%),
			conic-gradient(
				from 0deg at 50% -6%,
				transparent 0deg 162deg,
				rgba(var(--bb-licht), 0.07) 171deg,
				rgba(var(--bb-licht), 0.12) 180deg,
				rgba(var(--bb-licht), 0.07) 189deg,
				transparent 198deg 360deg
			);
	}

	.produkt-bild {
		max-width: 440px;
		margin-inline: auto;
	}
}

@media (max-width: 560px) {
	.produkt-info .wc-block-product-filter-chips__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
}

/* Bestellübersicht an der Kasse: dunkel statt hellgrau */
.wc-block-components-order-summary,
.wc-block-components-order-summary.is-large {
	background: transparent !important;
}

.wc-block-components-order-summary-item__quantity {
	border-color: var(--bb-linie) !important;
	background: var(--wp--preset--color--flaeche) !important;
	box-shadow: none !important;
	color: var(--wp--preset--color--text) !important;
}
