/*
Theme Name: MM Store
Theme URI: https://mmweb.net/mm-store/
Author: MM Web
Author URI: https://mmweb.net
Description: An accessible, framework-free WooCommerce block theme. MM Store is built on block templates and theme.json, uses the current WooCommerce blocks for the shop, product, cart and checkout, and adds accessible variation swatches, AJAX add to cart for the single-product form and a Frequently Bought Together section driven by native cross-sells. It loads no remote fonts, icons or frameworks.
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mm-store
Tags: e-commerce, block-patterns, block-styles, full-site-editing, wide-blocks, custom-colors, editor-style, one-column, two-columns

MM Store is distributed under the terms of the GNU GPL.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

*/

/*
 * Global fallbacks only. Colours, type, spacing, buttons and links are
 * defined in theme.json; component styles live in assets/css/.
 */

/* One visible focus indicator for every control that theme.json cannot reach. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast, #1c1a33);
	outline-offset: 2px;
}

.mm-store-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Long product names, words and URLs must never force horizontal scrolling. */
:where(h1, h2, h3, h4, h5, h6, p, li, td, th, dd, dt, figcaption, blockquote, a) {
	overflow-wrap: anywhere;
}

/* Preformatted text scrolls inside its own box instead of widening the page. */
:where(pre) {
	max-inline-size: 100%;
	overflow-x: auto;
}

/* Classic captions and media carry inline pixel widths. */
:where(.wp-caption, img, video, iframe, embed, object) {
	max-inline-size: 100%;
}

:where(img, video) {
	block-size: auto;
}

/*
 * Reduced motion. !important is required here: the visitor's preference has
 * to win over transitions and animations that core and WooCommerce declare
 * with higher specificity. 0.01ms (not 0) keeps transitionend and
 * animationend events firing for scripts that wait for them. MM Side Cart
 * honours the preference with its own motion token, so its markup is left
 * alone.
 */
@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto !important;
	}

	*:not(.mm-side-cart-root, .mm-side-cart-root *),
	*:not(.mm-side-cart-root, .mm-side-cart-root *)::before,
	*:not(.mm-side-cart-root, .mm-side-cart-root *)::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
