/*
Theme Name: CM Motorsport
Theme URI: https://cm-motorsport.ch
Author: CM Motorsport
Author URI: https://cm-motorsport.ch
Description: Block-Theme für den BMW-Shop und die Werkstatt von CM Motorsport. Helle Basis, Oswald und Source Sans 3, Rot nur für Aktionen.
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 7.4
Version: 1.1.0
WC requires at least: 8.0
WC tested up to: 8.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cm-motorsport
Tags: full-site-editing, block-patterns, block-styles, e-commerce, custom-colors, custom-logo, translation-ready
*/

/* Layout that theme.json cannot express. Colors, type and spacing come from presets. */

.cm-motorsport-header {
	border-bottom: 1px solid var(--wp--preset--color--base);
}

.cm-motorsport-header-row {
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}

.cm-motorsport-header-row.is-layout-flex {
	flex-wrap: nowrap;
}

.cm-motorsport-logo {
	flex-shrink: 0;
	width: auto;
	height: auto;
	max-width: none;
}

.cm-motorsport-logo img {
	width: 14rem;
	height: auto;
	max-width: 14rem;
}

.cm-motorsport-header .wp-block-navigation {
	flex-grow: 1;
	justify-content: center;
}

.cm-motorsport-header .wp-block-navigation__container {
	flex-wrap: nowrap;
	justify-content: center;
}

@media (max-width: 782px) {
	.cm-motorsport-header-row,
	.cm-motorsport-header-row.is-layout-flex {
		flex-wrap: wrap;
	}

	.cm-motorsport-header .wp-block-navigation__container {
		flex-wrap: wrap;
	}
}

.cm-motorsport-header .wp-block-navigation .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.cm-motorsport-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.cm-motorsport-header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--accent);
}

.cm-motorsport-header-tools {
	align-items: center;
}

.cm-motorsport-header-tools.is-layout-flex {
	flex-wrap: nowrap;
}

.cm-motorsport-header .wp-block-search,
.cm-motorsport-header .wc-block-product-search {
	max-width: 14rem;
}

.cm-motorsport-header .wc-block-product-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cm-motorsport-header .wc-block-product-search form,
.cm-motorsport-header .wc-block-product-search__fields {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin: 0;
}

.cm-motorsport-header .wc-block-product-search__field {
	width: 8rem;
	margin: 0;
}

.cm-motorsport-header .wc-block-product-search__button {
	margin: 0;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border: 0;
	border-radius: 0;
	font-family: var(--wp--preset--font-family--heading);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.cm-motorsport-shop {
	max-width: var(--wp--style--global--wide-size);
	margin-left: auto;
	margin-right: auto;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.wp-block-post-content > *:not(.elementor):not(.alignfull):not(.alignwide) {
	max-width: var(--wp--style--global--content-size);
	margin-left: auto;
	margin-right: auto;
}

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

input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea,
select {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 0;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	font-family: inherit;
}

.wc-block-mini-cart__badge {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border: 0;
	border-radius: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.9rem 1.75rem;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background-color: var(--wp--preset--color--surface);
	padding: var(--wp--preset--spacing--30);
	text-align: left;
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
	background-color: var(--wp--preset--color--base);
	width: 100%;
	height: auto;
	object-fit: contain;
	aspect-ratio: 1;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce div.product .product_title {
	font-family: var(--wp--preset--font-family--heading);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
}

.woocommerce ul.products li.product .woocommerce-loop-category__title mark,
.woocommerce ul.products li.product .count {
	background: transparent;
	color: var(--wp--preset--color--muted);
}

.woocommerce ul.products li.product .price,
.woocommerce div.product .summary .price {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

.woocommerce span.onsale {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border-radius: 0;
}

.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	color: var(--wp--preset--color--muted);
}

body.elementor-page {
	--e-global-typography-primary-font-family: var(--wp--preset--font-family--heading);
	--e-global-typography-secondary-font-family: var(--wp--preset--font-family--heading);
	--e-global-typography-text-font-family: var(--wp--preset--font-family--body);
	--e-global-typography-accent-font-family: var(--wp--preset--font-family--body);
	--e-global-color-primary: var(--wp--preset--color--accent);
}

.elementor-widget-heading .elementor-heading-title,
.elementor-icon-box-title {
	font-family: var(--wp--preset--font-family--heading);
	letter-spacing: 0.04em;
}

.home .wp-site-blocks > main {
	margin-block-start: 0;
}

.home .wp-block-post-content > .elementor > .elementor-section:first-child,
.home .entry-content > .elementor > .elementor-section:first-child {
	margin-top: 0;
}

.cm-motorsport-theme-toggle {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	cursor: pointer;
}

.cm-motorsport-theme-toggle:hover,
.cm-motorsport-theme-toggle:focus-visible {
	color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
}

html[data-theme="dark"] {
	color-scheme: dark;
}

html[data-theme="dark"] body {
	--wp--preset--color--base: #141311;
	--wp--preset--color--surface: #211F1C;
	--wp--preset--color--contrast: #F6F1E8;
	--wp--preset--color--muted: #C8C0B4;
	--wp--preset--color--accent: #BF0F0F;
	--wp--preset--color--on-accent: #FFFFFF;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

html[data-theme="dark"] a {
	color: var(--wp--preset--color--contrast);
}

html[data-theme="dark"] .wp-block-post-content a:not(.button):not(.wp-element-button):not(.wp-block-button__link),
html[data-theme="dark"] .entry-content a:not(.button):not(.wp-element-button):not(.wp-block-button__link),
html[data-theme="dark"] .woocommerce-breadcrumb a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

html[data-theme="dark"] .cm-motorsport-header .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

html[data-theme="dark"] footer a {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

html[data-theme="dark"] .cm-motorsport-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
html[data-theme="dark"] .cm-motorsport-header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

html[data-theme="dark"] .wp-element-button,
html[data-theme="dark"] .wp-block-button__link,
html[data-theme="dark"] .woocommerce a.button,
html[data-theme="dark"] .woocommerce button.button,
html[data-theme="dark"] .woocommerce input.button,
html[data-theme="dark"] .cm-motorsport-header .wc-block-product-search__button {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	text-decoration: none;
}

html[data-theme="dark"] .elementor-section:not(:has(.elementor-background-overlay)):not(:has(.elementor-background-video-container)) {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

html[data-theme="dark"] .elementor-section:not(:has(.elementor-background-overlay)):not(:has(.elementor-background-video-container)) .elementor-heading-title,
html[data-theme="dark"] .elementor-section:not(:has(.elementor-background-overlay)):not(:has(.elementor-background-video-container)) .elementor-icon-box-title,
html[data-theme="dark"] .elementor-section:not(:has(.elementor-background-overlay)):not(:has(.elementor-background-video-container)) .elementor-icon-box-description,
html[data-theme="dark"] .elementor-section:not(:has(.elementor-background-overlay)):not(:has(.elementor-background-video-container)) .elementor-widget-text-editor {
	color: var(--wp--preset--color--contrast);
}
