/**
 * WooCommerce – Basis (überall geladen)
 *
 * Tokens für Kategoriefarben und Graustufen, Mini-Cart, Store-Notices,
 * Button-Zustände, «Warenkorb ansehen»-Link.
 *
 * @package weingut-heidegg
 */

/* =========================================================================
   TOKENS
   ========================================================================= */

:root {
	--heidegg-grey-50: #f9fafb;
	--heidegg-grey-100: #f3f4f6;
	--heidegg-grey-200: #e5e7eb;
	--heidegg-grey-300: #d1d5db;
	--heidegg-grey-400: #9ca3af;
	--heidegg-grey-500: #6b7280;
	--heidegg-grey-600: #4b5563;
	--heidegg-grey-700: #374151;
	--heidegg-grey-900: #111827;

	--category-hover-opacity: 0.15;
	--category-transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base), text-decoration-color var(--transition-base), opacity var(--transition-base);
	--category-border-width: 3px;
	--category-border-width-thin: 2px;
	--category-border-width-accent: 4px;
	--category-padding-sm: 0.5rem;
	--category-padding-md: 1rem;
	--category-spacing-md: 1rem;
	--category-text-decoration-offset: 3px;
	--category-text-decoration-thickness: 2px;
	--category-accent-bar-width: 10px;
	--category-accent-bar-height: 1.2em;
	--category-disabled-opacity: 0.4;
}

/* Kategoriefarben: Body (Produktseite) und Produktkarten (li.product_cat-*) */
/* stylelint-disable selector-not-notation -- :not(a, b) hätte eine tiefere Spezifität und würde die Kaskade ändern. */
body.single-product:not([class*="product_cat-weisswein"]):not([class*="product_cat-rotwein"]):not([class*="product_cat-rosewein"]),
li[class*="product_cat-"]:not(.product_cat-weisswein):not(.product_cat-rotwein):not(.product_cat-rosewein) {
	/* stylelint-enable selector-not-notation */
	--category-accent: var(--heidegg-grey-200);
	--category-accent-dark: var(--heidegg-grey-400);
	--category-accent-light: var(--heidegg-grey-50);
}

/* Weisswein – Gelb */
body.product_cat-weisswein,
li.product_cat-weisswein {
	--category-accent: var(--wp--preset--color--yellow);
	--category-accent-dark: #f5e066;
	--category-accent-light: #fffceb;
}

/* Rotwein – Blau */
body.product_cat-rotwein,
li.product_cat-rotwein {
	--category-accent: var(--wp--preset--color--blue);
	--category-accent-dark: #8ccde6;
	--category-accent-light: #eaf7fb;
}

/* Roséwein – Pink */
body.product_cat-rosewein,
li.product_cat-rosewein {
	--category-accent: var(--wp--preset--color--pink);
	--category-accent-dark: #f4c4dd;
	--category-accent-light: #fef5fa;
}

/* =========================================================================
   BUTTONS UND NOTICES
   ========================================================================= */

/* !important: schlägt den Hover-Schatten der globalen Button-Styles (theme.json/WooCommerce). */
.wc-block-mini-cart__footer-cart.wc-block-components-button:hover {
	box-shadow: none !important;
}

/* !important: schlägt die Hover-Rahmenfarbe der Button-Block-Styles. */
.wc-block-components-button:not(.is-link).is-style-outline:hover,
.wc-block-components-button:not(.is-link).outlined:hover {
	border-color: var(--wp--preset--color--black) !important;
}

.wc-block-components-button:not(.is-link) {
	text-transform: uppercase;
}

.wc-block-components-button:not(.is-link):focus {
	box-shadow: none;
	outline: none;
}

.wc-block-components-button:not(.is-link):focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.woocommerce.wc-block-store-notices {
	outline: none;
}

.wc-block-components-notice-banner:focus-visible,
.wc-block-components-textarea:focus-visible {
	outline-style: solid;
	outline-width: 0;
}

/* WooCommerce setzt color:#2f2f2f !important auf den Link im Notice-Banner. */
.wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward {
	color: var(--wp--preset--color--black) !important;
	margin-top: 3px;
}

/* «Warenkorb ansehen» nach AJAX-Add-to-Cart */
.woocommerce a.added_to_cart,
.wc-block-components-product-button a.added_to_cart {
	font-size: var(--wp--preset--font-size--md);
	margin-top: var(--wp--preset--spacing--10);
}

/* =========================================================================
   MINI-CART
   ========================================================================= */

.wc-block-mini-cart__badge {
	transform: translateY(-75%);
}

.wc-block-mini-cart__button {
	color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--black);
	border-radius: 40px;
	transition: background-color var(--transition-base), color var(--transition-base);
}

.wc-block-mini-cart__products-table table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--lg);
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: uppercase;
}

.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions,
.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions > .block-editor-inner-blocks > .block-editor-block-list__layout {
	flex-direction: column;
}

h2.wc-block-mini-cart__title {
	font-size: var(--wp--preset--font-size--3-xl);
	margin: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) calc(-1 * var(--wp--preset--spacing--30));
	padding-bottom: var(--wp--preset--spacing--30);
}
