/*
 * MS-Produktion responsive frontend corrections.
 * Loaded after the original theme and WooCommerce styles.
 */

:root {
	--ms-color-primary: #005f73;
	--ms-color-primary-dark: #004555;
	--ms-color-accent: #ee9b00;
	--ms-color-text: #1f2933;
	--ms-color-muted: #5b6573;
	--ms-color-surface: #fff;
	--ms-color-surface-soft: #f6f8fa;
	--ms-color-border: #d9e0e6;
	--ms-color-success: #167c3a;
	--ms-color-warning: #9a5b00;
	--ms-color-danger: #9f2235;
	--ms-radius-sm: 0.5rem;
	--ms-radius-md: 0.75rem;
	--ms-radius-lg: 1rem;
	--ms-shadow-sm: 0 0.25rem 1rem rgba(31, 41, 51, 0.08);
	--ms-shadow-md: 0 0.75rem 2.25rem rgba(31, 41, 51, 0.14);
	--ms-focus-ring: 0 0 0 0.22rem rgba(238, 155, 0, 0.48);
}

/* One visual vocabulary for the theme and all first-party workspaces. */
:where(.ms-wtpd-card, .ms3d-configurator, .ms-cg, .msm-konf) {
	--ms-primary: var(--ms-color-primary);
	--ms-primary-dark: var(--ms-color-primary-dark);
	--ms-accent: var(--ms-color-accent);
	--ms-text: var(--ms-color-text);
	--ms-muted: var(--ms-color-muted);
	--ms-border: var(--ms-color-border);
	--ms-surface: var(--ms-color-surface);
	font-size: clamp(1rem, 0.96rem + 0.12vw, 1.075rem);
	line-height: 1.55;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 0.16rem solid var(--ms-color-accent) !important;
	outline-offset: 0.18rem;
	box-shadow: var(--ms-focus-ring);
}

.skip-link:focus {
	z-index: 100000;
	top: 0.75rem;
	left: 0.75rem;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75rem 1rem;
	border-radius: var(--ms-radius-sm);
	background: var(--ms-color-text);
	color: #fff;
}

/* Font Awesome Free is bundled locally. Map legacy light/regular classes to
 * the available solid font so saved Customizer icon choices stay visible. */
.fa:not(.fab):not(.fa-brands),
.fas,
.fal,
.far,
.fa-solid,
.fa-light,
.fa-regular {
	font-family: "Font Awesome 6 Free";
	font-weight: 900 !important;
}

.wf_post_item .more-link::after,
.woocommerce ul.products li.product .product-single .product-img .button.quickview-trigger::after,
.woocommerce ul.products li.product .product-action a::before,
.woocommerce ul.products li.product .product-action a::after {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
}

/* Preserve icon choices saved by older theme versions even where the old
 * Font Awesome Pro/brand glyph is no longer part of the bundled free set. */
.fa-grid-2::before {
	content: "\f58d";
}

.fa-money-check-dollar-pen::before {
	content: "\f53d";
}

.fa-rectangle-history::before {
	content: "\f1da";
}

.fab.fa-nintendo-switch,
.fab.fa-tripadvisor {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
}

.fa-nintendo-switch::before {
	content: "\f11b";
}

.fa-tripadvisor::before {
	content: "\f072";
}

/* Header product categories: closed until the visitor opens them. */
.product-categories .wf_navbar-nav[hidden] {
	display: none !important;
}

.product-categories .product-categories-btn[aria-expanded="false"]::after {
	transform: rotate(45deg);
}

.product-categories .product-categories-btn[aria-expanded="true"]::after {
	transform: rotate(-135deg);
}

/* Slider and banners always stay inside their available width. */
.wf_slider,
.wf_slider .slider,
.wf_slider .owl-stage-outer,
.wf_slider .wf_slider-item,
.wf_slider .wf_slider-wrapper,
.wf_banners,
.wf_banners .wf-container {
	max-width: 100%;
	width: 100%;
}

.wf_slider .wf_slider-item > img {
	width: 100%;
	object-fit: cover;
	object-position: center;
}

.wf_slider .last .banner-img {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

.wf_slider .last .banner-img img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: 46rem;
	object-fit: contain;
}

.wf_banners .wf-row > [class*="wf-col-"] {
	display: flex;
	min-width: 0;
}

.wf_banners .wf_banner-item {
	width: 100%;
	max-width: 100%;
}

.wf_banners .wf_banner-img img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Equal cards: stretch every card and anchor actions at the bottom. */
.wf_posts .wf-row.wf-g-4:not([data-masonry]) > [class*="wf-col-"] {
	display: flex;
}

.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item .image {
	aspect-ratio: 16 / 10;
	background: #f4f4f4;
}

.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item .image > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item .inner,
.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item .content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item .more-link {
	align-self: center;
	margin-top: auto;
}

.woocommerce ul.products:not(.list) li.product,
.woocommerce ul.products:not(.list) li.product .product,
.woocommerce ul.products:not(.list) li.product .product-single {
	display: flex;
	flex-direction: column;
}

.woocommerce ul.products:not(.list) li.product .product,
.woocommerce ul.products:not(.list) li.product .product-single {
	width: 100%;
	height: 100%;
}

.woocommerce ul.products:not(.list) li.product .product-content-outer {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.woocommerce ul.products:not(.list) li.product .product-content {
	flex: 1 1 auto;
}

.woocommerce ul.products:not(.list) li.product .product-action {
	margin-top: auto;
}

.ms-product-configurable-badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.7rem;
	border-radius: 999px;
	background: var(--ms-color-primary);
	box-shadow: var(--ms-shadow-sm);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
}

.woocommerce a.button.ms-configure-product,
.woocommerce .product-action a.ms-configure-product {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	background: var(--ms-color-primary);
	color: #fff;
}

.woocommerce a.button.ms-configure-product:hover,
.woocommerce a.button.ms-configure-product:focus-visible {
	background: var(--ms-color-primary-dark);
	color: #fff;
}

.ms-product-configurator-notice {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 1rem 0;
	padding: 0.9rem 1rem;
	border: 1px solid #b3cdd3;
	border-color: color-mix(in srgb, var(--ms-color-primary) 30%, #fff);
	border-left: 0.3rem solid var(--ms-color-primary);
	border-radius: var(--ms-radius-sm);
	background: #f1f7f8;
	background: color-mix(in srgb, var(--ms-color-primary) 7%, #fff);
}

.ms-product-configurator-notice > i {
	margin-top: 0.18rem;
	color: var(--ms-color-primary);
}

.ms-product-configurator-notice strong,
.ms-product-configurator-notice span {
	display: block;
}

.ms-product-configurator-notice span {
	margin-top: 0.2rem;
	color: var(--ms-color-muted);
	font-size: 0.9em;
}

.ms-product-layout-toggle {
	display: inline-flex;
	gap: 0.35rem;
}

.woocommerce .ms-product-layout-toggle button {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--ms-color-border);
	border-radius: var(--ms-radius-sm);
	background: #fff;
	color: var(--ms-color-text);
	cursor: pointer;
}

.woocommerce .ms-product-layout-toggle button.active,
.woocommerce .ms-product-layout-toggle button[aria-pressed="true"] {
	border-color: var(--ms-color-primary);
	background: var(--ms-color-primary);
	color: #fff;
}

.woocommerce ul.products:not(.list) li.product .product-img {
	aspect-ratio: 1 / 1;
	min-height: 0;
	background: #f7f7f7;
}

.woocommerce ul.products:not(.list) li.product .product-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.woocommerce ul.products:not(.list) li.product-category > a {
	display: flex !important;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.woocommerce ul.products:not(.list) li.product-category img {
	aspect-ratio: 1 / 1;
	width: 100%;
	object-fit: cover;
}

.wf_product_category_one .owl-stage,
.woocommerce ul.products.owl-carousel .owl-stage {
	display: flex;
}

.wf_product_category_one .owl-item,
.woocommerce ul.products.owl-carousel .owl-item,
.wf_product_category_one .product-category,
.wf_product_category_one .category-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.wf_product_category_one .product-category,
.wf_product_category_one .category-inner {
	width: 100%;
}

.wf_product_category_one .category-mask {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	justify-content: space-between;
}

/* Editable and responsive CTA background. */
.wf_hurry {
	isolation: isolate;
	background-color: var(--ms-cta-bg-color, #f7f7f7);
	background-image: var(--ms-cta-bg-image, none);
	background-repeat: no-repeat;
	background-position: var(--ms-cta-bg-position, center center);
	background-size: var(--ms-cta-bg-size, cover);
	color: var(--ms-cta-text-color, #303030);
}

.wf_hurry::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	content: "";
	background-color: var(--ms-cta-overlay-color, #000);
	opacity: var(--ms-cta-overlay-opacity, 0);
	pointer-events: none;
}

.wf_hurry .section-title .title,
.wf_hurry .section-title p {
	color: inherit;
}

.wf_hurry .hurry-img-bg {
	display: none !important;
}

.wf_hurry .hurry-img img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: clamp(26rem, 36vw, 50rem);
	height: auto;
	margin-inline: auto;
	object-fit: contain;
}

/* Native WooCommerce 11.1 EU withdrawal workflow entry points. */
.ms-legal-navigation {
	display: flex;
	justify-content: center;
	padding: 0.85rem 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(0, 0, 0, 0.12);
}

.ms-eu-withdrawal-shortcut {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 700;
	text-decoration: none;
}

.ms-legal-navigation ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-legal-navigation a {
	color: #fff;
	font-weight: 700;
	text-underline-offset: 0.2em;
}

.ms-legal-navigation a:hover,
.ms-legal-navigation a:focus-visible {
	color: #fff;
	text-decoration-thickness: 0.14em;
}

.ms-eu-withdrawal-shortcut {
	position: fixed;
	z-index: 9990;
	right: 1rem;
	bottom: 1rem;
	min-height: 2.75rem;
	padding: 0.65rem 0.9rem;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--ms-color-danger);
	box-shadow: var(--ms-shadow-md);
	color: #fff;
}

.ms-eu-withdrawal-shortcut:hover,
.ms-eu-withdrawal-shortcut:focus-visible {
	background: #731726;
	color: #fff;
}

/* WooCommerce Cart/Checkout blocks inherit the theme's button language. */
.wc-block-components-button,
.wp-block-button__link,
.wc-block-cart__submit-button {
	border-radius: var(--ms-radius-md);
}

.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button {
	background-color: var(--ms-color-primary);
	color: #fff;
}

.wc-block-components-notice-banner {
	border-radius: var(--ms-radius-md);
}

.ms-dialog-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.wf_slider .wf_slider-item,
	.wf_slider .wf_slider-innercell,
	.wf_slider .wf_slider-item > img {
		min-height: clamp(42rem, 110vw, 52rem);
		max-height: none;
	}

	.wf_slider .wf_slider-content {
		padding-inline: 1.5rem;
	}

	.wf_banners_one .wf_banner-item {
		flex-direction: column;
	}

	.wf_banners_one .wf_banner-item .wf_banner-content,
	.wf_banners_one .wf_banner-item .wf_banner-img,
	.wf_banners_one .wf_banner-item .wf_banner-img img {
		width: 100%;
		min-height: 0;
		max-height: none;
	}

	.wf_banners_one .wf_banner-item .wf_banner-img {
		aspect-ratio: 16 / 10;
	}

	.wf_hurry {
		background-image: var(--ms-cta-bg-image-mobile, var(--ms-cta-bg-image, none));
		background-position: center center;
	}

	.wf_hurry .hurry-content {
		padding: clamp(2.5rem, 8vw, 4rem);
	}
}

@media (max-width: 575px) {
	.wf_posts .wf-row.wf-g-4:not([data-masonry]) .wf_post_item,
	.woocommerce ul.products:not(.list) li.product .product-single,
	.wf_product_category_one .category-inner {
		min-height: 0 !important;
	}

	.ms-eu-withdrawal-shortcut {
		right: 0.65rem;
		bottom: 0.65rem;
		max-width: calc(100vw - 1.3rem);
		padding: 0.6rem 0.75rem;
		font-size: 0.82rem;
	}
}

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

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

.wf_slider {
    position: relative;
}

.ms-carousel-toggle {
    align-items: center;
    background: rgba(31, 41, 51, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    bottom: 1rem;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.875rem;
    gap: 0.5rem;
    inset-inline-end: max(1rem, calc((100vw - 1600px) / 2));
    padding: 0.625rem 0.9rem;
    position: absolute;
    z-index: 8;
}

.ms-carousel-toggle:hover,
.ms-carousel-toggle:focus-visible {
    background: var(--ms-color-primary);
    color: #fff;
}

@media (max-width: 575px) {
    .ms-carousel-toggle span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}
