/*
 * Modern Shoe Store UI for WooCommerce
 * Colours, radii, columns and font come from variables printed by the plugin.
 * Every rule is scoped to body.mssui-* so each area can be switched off.
 */

body.mssui {
	--mssui-text: #151a21;
	--mssui-muted: #5e6673;
	--mssui-line: #e2e5e9;
	--mssui-star: #f2a516;
	--mssui-ok: #1c8a4b;
	--mssui-err: #c62828;
	--mssui-primary-hover: #12263a;
	--mssui-focus: color-mix(in srgb, var(--mssui-primary) 22%, transparent);
}
body.mssui { --mssui-accent-hover: var(--mssui-accent); }
@supports (color: color-mix(in srgb, red, blue)) {
	body.mssui {
		--mssui-primary-hover: color-mix(in srgb, var(--mssui-primary) 82%, #000);
		--mssui-accent-hover: color-mix(in srgb, var(--mssui-accent) 85%, #000);
	}
}

/* Font: WooCommerce areas only */
body.mssui :is(.woocommerce, ul.products, .wc-block-grid, .wc-block-cart, .wc-block-checkout, .mssui-sticky),
body.mssui :is(.woocommerce, ul.products, .mssui-sticky) :is(button, input, select, textarea) {
	font-family: var(--mssui-font);
}

/* Visible keyboard focus */
body.mssui :is(.woocommerce, ul.products, .mssui-sticky) :is(a, button, input, select, textarea, .variable-item, .swatch, .cfvsw-swatches-option):focus-visible {
	outline: 2px solid var(--mssui-primary);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
body.mssui :is(.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, ul.products li.product .button, .wc-block-components-button:not(.is-link), .wp-block-woocommerce-cart .wp-element-button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border: 1.5px solid var(--mssui-primary) !important;
	border-radius: var(--mssui-btn-radius) !important;
	background: var(--mssui-primary) !important;
	color: var(--mssui-primary-ink) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
body.mssui :is(.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .wc-block-components-button:not(.is-link)):hover {
	background: var(--mssui-primary-hover) !important;
	border-color: var(--mssui-primary-hover) !important;
}
body.mssui :is(.woocommerce a.button, .woocommerce button.button, .woocommerce input.button):is(:disabled, .disabled, [disabled]) {
	opacity: .45;
	cursor: not-allowed;
}

/* The loud buttons use the action colour */
body.mssui :is(.woocommerce .single_add_to_cart_button, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce a.checkout-button, .woocommerce #place_order, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
	background: var(--mssui-accent) !important;
	border-color: var(--mssui-accent) !important;
	color: var(--mssui-accent-ink) !important;
}
body.mssui :is(.woocommerce .single_add_to_cart_button, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce a.checkout-button, .woocommerce #place_order, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button):hover {
	background: var(--mssui-accent-hover) !important;
	border-color: var(--mssui-accent-hover) !important;
}

/* ------------------------------------------------------------------ *
 * Shop, categories, search, related products
 * ------------------------------------------------------------------ */
body.mssui-shop ul.products:not(.elementor-grid):not(.swiper-wrapper) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 14px;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}
@media (min-width: 700px) {
	body.mssui-shop ul.products:not(.elementor-grid):not(.swiper-wrapper) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 28px 20px;
	}
}
@media (min-width: 1024px) {
	body.mssui-shop ul.products:not(.elementor-grid):not(.swiper-wrapper) {
		grid-template-columns: repeat(var(--mssui-cols), minmax(0, 1fr));
		gap: 36px 24px;
	}
}
body.mssui-shop ul.products::before,
body.mssui-shop ul.products::after {
	display: none !important;
	content: none !important;
}

body.mssui-shop ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	float: none !important;
	width: auto !important;
	max-width: none;
	margin: 0 !important;
	padding: 0;
	text-align: left;
}

/* Photo: sits on a soft panel, white backgrounds blend into it */
body.mssui-shop ul.products li.product a.woocommerce-LoopProduct-link {
	position: relative;
	display: block;
	flex: 1 1 auto;
	isolation: isolate;
	color: var(--mssui-text);
	text-decoration: none;
}
body.mssui-shop ul.products li.product a.woocommerce-LoopProduct-link::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	aspect-ratio: var(--mssui-ratio);
	background: var(--mssui-surface);
	border-radius: var(--mssui-card-radius);
	z-index: 0;
}
body.mssui-shop ul.products li.product a.woocommerce-LoopProduct-link img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--mssui-ratio);
	object-fit: contain;
	margin: 0 0 14px;
	padding: 6%;
	border-radius: var(--mssui-card-radius);
	box-shadow: none;
}
body.mssui-shop.mssui-blend ul.products li.product a.woocommerce-LoopProduct-link img {
	mix-blend-mode: multiply;
}

body.mssui-shop ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 6px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--mssui-text);
}
body.mssui-shop ul.products li.product .star-rating {
	margin: 0 0 6px;
	font-size: 13px;
}
body.mssui-shop :is(.price) {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	color: var(--mssui-text);
	font-size: 15px;
	font-weight: 700;
}
body.mssui-shop .price del {
	order: 2;
	color: var(--mssui-muted);
	font-size: .88em;
	font-weight: 400;
	opacity: 1;
}
body.mssui-shop .price ins {
	order: 1;
	background: none;
	color: var(--mssui-accent);
	text-decoration: none;
}
body.mssui-shop ul.products li.product .button {
	width: 100%;
	margin-top: 14px;
	/* quiet outline in the grid so the page does not shout */
	background: transparent !important;
	color: var(--mssui-primary) !important;
}
body.mssui-shop ul.products li.product .button:hover {
	background: var(--mssui-primary) !important;
	color: var(--mssui-primary-ink) !important;
}
body.mssui-shop ul.products li.product .added_to_cart {
	margin-top: 8px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--mssui-primary);
}

/* Sale badge */
body.mssui-shop :is(.onsale) {
	position: absolute;
	top: 12px;
	left: 12px;
	right: auto;
	z-index: 3;
	min-width: 0;
	min-height: 0;
	width: auto;
	height: auto;
	margin: 0;
	padding: 6px 11px;
	border-radius: 999px;
	background: var(--mssui-accent);
	color: var(--mssui-accent-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

/* Result count + sorting */
body.mssui-shop .woocommerce-result-count {
	margin: 0 0 1rem;
	color: var(--mssui-muted);
	font-size: 14px;
}
body.mssui-shop .woocommerce-ordering select {
	height: 44px;
	padding: 0 14px;
	border: 1.5px solid var(--mssui-line);
	border-radius: var(--mssui-btn-radius);
	background-color: #fff;
	color: var(--mssui-text);
	font-size: 14px;
}
body.mssui-shop .woocommerce-breadcrumb {
	margin-bottom: 1.25rem;
	color: var(--mssui-muted);
	font-size: 13px;
}
body.mssui-shop .woocommerce-breadcrumb a { color: var(--mssui-muted); }

/* Pagination */
body.mssui-shop .woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 1rem 0 2rem;
	padding: 0;
	border: 0;
}
body.mssui-shop .woocommerce-pagination ul.page-numbers li {
	margin: 0;
	border: 0;
	overflow: visible;
}
body.mssui-shop .woocommerce-pagination ul.page-numbers :is(a, span) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1.5px solid var(--mssui-line);
	border-radius: 10px;
	background: #fff;
	color: var(--mssui-text);
	font-weight: 600;
	text-decoration: none;
}
body.mssui-shop .woocommerce-pagination ul.page-numbers span.current {
	border-color: var(--mssui-primary);
	background: var(--mssui-primary);
	color: var(--mssui-primary-ink);
}

/* ------------------------------------------------------------------ *
 * Single product
 * ------------------------------------------------------------------ */
body.mssui-product.single-product div.product .product_title {
	margin: 0 0 .5rem;
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: var(--mssui-text);
}
body.mssui-product.single-product div.product .summary .price {
	margin: 0 0 1rem;
	font-size: 1.5rem;
}
body.mssui-product .woocommerce-product-details__short-description {
	margin-bottom: 1.25rem;
	color: var(--mssui-muted);
	line-height: 1.65;
}
body.mssui-product .woocommerce-product-gallery__image img,
body.mssui-product .woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: var(--mssui-card-radius);
}
body.mssui-product .woocommerce-product-gallery__wrapper {
	background: var(--mssui-surface);
	border-radius: var(--mssui-card-radius);
}
body.mssui-product.mssui-blend .woocommerce-product-gallery__image img {
	mix-blend-mode: multiply;
}
/* Gallery thumbnails: big enough to see the shoe, four across */
body.mssui-product .woocommerce-product-gallery .flex-control-thumbs,
body.mssui-product .woocommerce-product-gallery ol.flex-control-nav {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 0 !important;
	padding: 0 !important;
	list-style: none;
}
body.mssui-product .woocommerce-product-gallery .flex-control-thumbs li {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	overflow: hidden;
	isolation: isolate;
	border-radius: 12px;
	background: var(--mssui-surface);
}
body.mssui-product .woocommerce-product-gallery .flex-control-thumbs li img {
	display: block;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1;
	object-fit: contain;
	padding: 6px;
	box-sizing: border-box;
	border: 2px solid transparent;
	border-radius: 12px;
	background: transparent;
	opacity: .7;
	cursor: pointer;
	transition: opacity .15s ease, border-color .15s ease;
}
body.mssui-product.mssui-blend .woocommerce-product-gallery .flex-control-thumbs li img {
	mix-blend-mode: multiply;
}
body.mssui-product .woocommerce-product-gallery .flex-control-thumbs li img:hover { opacity: 1; }
body.mssui-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	border-color: var(--mssui-primary);
	opacity: 1;
}
@media (max-width: 600px) {
	/* On phones: one swipeable row of 84px thumbs */
	body.mssui-product .woocommerce-product-gallery .flex-control-thumbs {
		display: flex !important;
		gap: 10px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	body.mssui-product .woocommerce-product-gallery .flex-control-thumbs li {
		flex: 0 0 84px;
		scroll-snap-align: start;
	}
}

/* Variations: label above options, easy to tap */
body.mssui-product table.variations,
body.mssui-product table.variations tbody,
body.mssui-product table.variations tr,
body.mssui-product table.variations :is(th, td) {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
}
body.mssui-product table.variations { margin: 0 0 1rem; }
body.mssui-product table.variations tr { margin-bottom: 18px; }
body.mssui-product table.variations th.label,
body.mssui-product table.variations td.label {
	margin-bottom: 8px;
	color: var(--mssui-text);
	font-size: 14px;
	font-weight: 700;
}
body.mssui-product table.variations select:not([class*="raw-select"]) {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1.5px solid var(--mssui-line);
	border-radius: var(--mssui-btn-radius);
	background-color: #fff;
	font-size: 16px;
}
body.mssui-product :is(.reset_variations) {
	display: inline-block;
	margin-top: 8px;
	color: var(--mssui-muted);
	font-size: 13px;
	text-decoration: underline;
}
body.mssui-product .woocommerce-variation-price .price { font-size: 1.25rem; }
body.mssui-product .woocommerce-variation-availability { margin-bottom: 12px; }

/* Quantity + add to cart row */
body.mssui-product :is(form.cart:not(.variations_form):not(.grouped_form), .woocommerce-variation-add-to-cart) {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
	margin: 0 0 1rem;
}
body.mssui-product .quantity { margin: 0; }
body.mssui-product .quantity .qty {
	width: 80px;
	height: 52px;
	padding: 0 8px;
	border: 1.5px solid var(--mssui-line);
	border-radius: var(--mssui-btn-radius);
	background: #fff;
	color: var(--mssui-text);
	font-size: 16px;
	font-weight: 600;
	text-align: center;
}
body.mssui-product .single_add_to_cart_button {
	flex: 1 1 200px;
	min-height: 52px;
	font-size: 16px;
}

/* Stock */
body.mssui-product .stock { font-size: 14px; font-weight: 600; }
body.mssui-product .stock.in-stock { color: var(--mssui-ok); }
body.mssui-product .stock.out-of-stock { color: var(--mssui-err); }

/* Trust notes */
.mssui-trust {
	display: grid;
	gap: 8px;
	margin: 18px 0 0;
	padding: 14px 16px;
	list-style: none;
	border-radius: var(--mssui-card-radius);
	background: var(--mssui-surface);
	color: var(--mssui-text);
	font-size: 14px;
	font-weight: 500;
}
.mssui-trust li {
	position: relative;
	margin: 0;
	padding-left: 26px;
}
.mssui-trust li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .1em;
	width: 18px;
	height: 18px;
	background: var(--mssui-ok);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9.5 16.6 5.4 12.5l-1.4 1.4 5.5 5.5L21 7.9l-1.4-1.4z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9.5 16.6 5.4 12.5l-1.4 1.4 5.5 5.5L21 7.9l-1.4-1.4z'/></svg>") center / contain no-repeat;
}

/* Meta */
body.mssui-product .product_meta {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--mssui-line);
	color: var(--mssui-muted);
	font-size: 14px;
}
body.mssui-product .product_meta > span { display: block; margin-bottom: 4px; }

/* Tabs */
body.mssui-product .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 28px;
	margin: 0 0 24px;
	padding: 0;
	overflow-x: auto;
	white-space: nowrap;
	border-bottom: 1px solid var(--mssui-line);
}
body.mssui-product .woocommerce-tabs ul.tabs::before,
body.mssui-product .woocommerce-tabs ul.tabs li::before,
body.mssui-product .woocommerce-tabs ul.tabs li::after {
	display: none;
}
body.mssui-product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}
body.mssui-product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 12px 0;
	color: var(--mssui-muted);
	font-weight: 600;
	text-decoration: none;
}
body.mssui-product .woocommerce-tabs ul.tabs li.active a {
	color: var(--mssui-text);
	box-shadow: inset 0 -2px 0 var(--mssui-primary);
}
body.mssui-product :is(.related.products, .upsells.products, .cross-sells) > h2 {
	margin-bottom: 20px;
	font-size: 1.4rem;
	font-weight: 700;
}

/* Reviews */
body.mssui-product .star-rating span::before { color: var(--mssui-star); }
body.mssui-product #reviews #comments ol.commentlist li .comment_container {
	padding: 16px;
	border: 1px solid var(--mssui-line);
	border-radius: var(--mssui-card-radius);
}
body.mssui-product #reviews #comments ol.commentlist li img.avatar {
	border-radius: 50%;
	border: 0;
}

/* ------------------------------------------------------------------ *
 * Subcategory slider
 * ------------------------------------------------------------------ */
.mssui-subcats { margin: 0 0 30px; }
.mssui-subcats__title {
	margin: 0 0 14px;
	color: var(--mssui-text);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.2;
}
.mssui-subcats__wrap { position: relative; }
.mssui-subcats__track {
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 4px 3px 8px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.mssui-subcats__track::-webkit-scrollbar { display: none; }
.mssui-subcats__item {
	flex: 0 0 auto;
	width: 108px;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}
@media (min-width: 768px) {
	.mssui-subcats__track { gap: 18px; }
	.mssui-subcats__item { width: 136px; }
}
.mssui-subcats__item a {
	display: block;
	color: var(--mssui-text);
	text-align: center;
	text-decoration: none;
}
.mssui-subcats__img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border: 1.5px solid var(--mssui-line);
	border-radius: var(--mssui-card-radius);
	background: var(--mssui-surface);
	transition: border-color .15s ease;
}
.mssui-subcats__img img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}
.mssui-subcats__item a:hover .mssui-subcats__img { border-color: var(--mssui-primary); }
.mssui-subcats__name {
	display: block;
	margin-top: 9px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
}
.mssui-subcats__item.is-current .mssui-subcats__img {
	border-color: var(--mssui-primary);
	box-shadow: 0 0 0 1px var(--mssui-primary);
}
.mssui-subcats__item.is-current .mssui-subcats__name { font-weight: 700; }

.mssui-subcats__arrow[hidden] { display: none; }
.mssui-subcats__arrow { display: none; }
@media (min-width: 768px) {
	.mssui-subcats__arrow:not([hidden]) {
		position: absolute;
		top: calc(68px - 20px);
		z-index: 2;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 1px solid var(--mssui-line);
		border-radius: 50%;
		background: #fff;
		box-shadow: 0 4px 14px -4px rgba(16, 24, 40, .3);
		cursor: pointer;
	}
	.mssui-subcats__arrow::before {
		content: "";
		width: 18px;
		height: 18px;
		background: var(--mssui-text);
		-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.6 5.6 7.2 7l5 5-5 5 1.4 1.4L15 12z'/></svg>") center / contain no-repeat;
		mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.6 5.6 7.2 7l5 5-5 5 1.4 1.4L15 12z'/></svg>") center / contain no-repeat;
	}
	.mssui-subcats__arrow--prev { left: -12px; }
	.mssui-subcats__arrow--prev::before { transform: scaleX(-1); }
	.mssui-subcats__arrow--next { right: -12px; }
}

/* ------------------------------------------------------------------ *
 * Variation swatches
 * Covers: Variation Swatches for WooCommerce (Emran Ahmed: .variable-item),
 * ThemeAlien (.tawcvs-swatches .swatch) and CodeCrew/CyberChimps (.cfvsw-*).
 * Important is used where those plugins use very specific selectors.
 * ------------------------------------------------------------------ */
body.mssui-swatches .woo-variation-swatches .variable-items-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
body.mssui-swatches .woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item) {
	margin: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	transition: border-color .15s ease, background-color .15s ease;
}

/* Size buttons */
body.mssui-swatches .woo-variation-swatches .variable-items-wrapper .button-variable-item:not(.radio-variable-item),
body.mssui-swatches .tawcvs-swatches .swatch-label,
body.mssui-swatches .cfvsw-swatches-container .cfvsw-swatches-option.cfvsw-label-option {
	min-width: 52px !important;
	height: 46px !important;
	padding: 0 14px !important;
	border: 1.5px solid #d3d8de !important;
	background: #fff !important;
	color: var(--mssui-text) !important;
	font-size: 15px;
	font-weight: 600;
}
body.mssui-swatches .woo-variation-swatches .button-variable-item:not(.radio-variable-item):hover,
body.mssui-swatches .tawcvs-swatches .swatch-label:hover,
body.mssui-swatches .cfvsw-swatches-container .cfvsw-label-option:hover {
	border-color: var(--mssui-primary) !important;
}
body.mssui-swatches .woo-variation-swatches .button-variable-item.selected:not(.radio-variable-item),
body.mssui-swatches .tawcvs-swatches .swatch-label.selected,
body.mssui-swatches .cfvsw-swatches-container .cfvsw-label-option.cfvsw-selected-swatch {
	border-color: var(--mssui-primary) !important;
	background: var(--mssui-primary) !important;
	color: var(--mssui-primary-ink) !important;
}

/* Colour and image swatches: round, with a ring when selected */
body.mssui-swatches .woo-variation-swatches .variable-items-wrapper :is(.color-variable-item, .image-variable-item):not(.radio-variable-item),
body.mssui-swatches .tawcvs-swatches :is(.swatch-color, .swatch-image),
body.mssui-swatches .cfvsw-swatches-container :is(.cfvsw-color-option, .cfvsw-image-option) {
	width: 40px !important;
	height: 40px !important;
	border: 1px solid rgba(0, 0, 0, .14) !important;
	border-radius: 50% !important;
	overflow: hidden;
}
body.mssui-swatches .woo-variation-swatches .variable-items-wrapper :is(.color-variable-item, .image-variable-item).selected:not(.radio-variable-item),
body.mssui-swatches .tawcvs-swatches :is(.swatch-color, .swatch-image).selected,
body.mssui-swatches .cfvsw-swatches-container :is(.cfvsw-color-option, .cfvsw-image-option).cfvsw-selected-swatch {
	border-color: transparent !important;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mssui-primary) !important;
}

/* Out of stock / unavailable: faded with a diagonal strike */
body.mssui-swatches .woo-variation-swatches .variable-item.disabled,
body.mssui-swatches .tawcvs-swatches .swatch.swatch-disabled,
body.mssui-swatches .cfvsw-swatches-container .cfvsw-swatches-out-of-stock {
	opacity: .5 !important;
	cursor: not-allowed;
}
body.mssui-swatches .woo-variation-swatches .button-variable-item.disabled:not(.radio-variable-item) {
	background: linear-gradient(to top right, transparent calc(50% - 1px), #b9c0c9 50%, transparent calc(50% + 1px)), #fff !important;
	color: var(--mssui-muted) !important;
}

/* "Selected: 42" next to the label */
body.mssui-swatches .woo-selected-variation-item-name {
	margin-left: 6px;
	color: var(--mssui-muted);
	font-weight: 500;
}
body.mssui-swatches .woo-variation-swatches .variable-items-wrapper .variable-item span {
	line-height: 1;
}

/* Gentle highlight when someone taps Add to cart before picking a size */
body.mssui-product form.mssui-nudge table.variations {
	outline: 2px solid var(--mssui-accent);
	outline-offset: 8px;
	border-radius: 10px;
}

/* ------------------------------------------------------------------ *
 * Forms (checkout, account, reviews, coupon)
 * ------------------------------------------------------------------ */
body.mssui :is(.mssui-checkout-scope, .woocommerce) form .form-row label {
	margin-bottom: 6px;
	color: var(--mssui-text);
	font-size: 14px;
	font-weight: 600;
}
body.mssui :is(.woocommerce form .form-row, .woocommerce-cart-form, .coupon, #review_form) :is(input.input-text, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], textarea, select),
body.mssui .woocommerce form .form-row .select2-container--default .select2-selection--single {
	min-height: 48px;
	padding: 0 14px;
	border: 1.5px solid var(--mssui-line);
	border-radius: var(--mssui-btn-radius);
	background-color: #fff;
	color: var(--mssui-text);
	font-size: 16px; /* 16px stops iOS zooming into fields */
	box-shadow: none;
}
body.mssui .woocommerce form .form-row textarea { padding: 12px 14px; min-height: 110px; }
body.mssui .woocommerce form .form-row .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 45px;
	padding-left: 0;
}
body.mssui .woocommerce form .form-row .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
body.mssui :is(.woocommerce form .form-row, .woocommerce-cart-form, .coupon, #review_form) :is(input, textarea, select):focus,
body.mssui .woocommerce form .form-row .select2-container--focus .select2-selection--single {
	border-color: var(--mssui-primary);
	outline: 0;
	box-shadow: 0 0 0 4px var(--mssui-focus);
}
body.mssui .woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: var(--mssui-err); }

/* ------------------------------------------------------------------ *
 * Notices
 * ------------------------------------------------------------------ */
body.mssui :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
	margin-bottom: 1.5rem;
	padding-top: 16px;
	padding-bottom: 16px;
	border: 1px solid var(--mssui-line);
	border-top-width: 1px;
	border-radius: var(--mssui-card-radius);
	background: var(--mssui-surface);
	color: var(--mssui-text);
}
body.mssui .woocommerce-message { background: #effaf3; border-color: #bfe6cd; }
body.mssui .woocommerce-message::before { color: var(--mssui-ok); }
body.mssui .woocommerce-error { background: #fdf0f0; border-color: #f2c4c4; }
body.mssui .woocommerce-error::before { color: var(--mssui-err); }
body.mssui .woocommerce-info::before { color: var(--mssui-primary); }
body.mssui .woocommerce-message a.button,
body.mssui .woocommerce-info a.button { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* ------------------------------------------------------------------ *
 * Cart
 * ------------------------------------------------------------------ */
body.mssui-cart table.shop_table {
	border: 1px solid var(--mssui-line);
	border-radius: var(--mssui-card-radius);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}
body.mssui-cart table.shop_table :is(th, td) {
	padding: 16px;
	border-top: 1px solid var(--mssui-line);
}
body.mssui-cart table.shop_table thead th {
	border-top: 0;
	background: var(--mssui-surface);
	color: var(--mssui-muted);
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
}
body.mssui-cart table.cart img {
	width: 76px;
	height: auto;
	border-radius: 12px;
	background: var(--mssui-surface);
}
body.mssui-cart table.cart td.product-name a {
	color: var(--mssui-text);
	font-weight: 600;
	text-decoration: none;
}
body.mssui-cart table.cart td.product-remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--mssui-surface);
	color: var(--mssui-muted) !important;
	font-size: 18px;
	line-height: 1;
}
body.mssui-cart table.cart td.product-remove a.remove:hover {
	background: var(--mssui-err);
	color: #fff !important;
}
body.mssui-cart table.cart .quantity .qty { width: 72px; height: 44px; }
body.mssui-cart table.cart td.actions .coupon { display: flex; gap: 8px; flex-wrap: wrap; }
body.mssui-cart table.cart td.actions .coupon input#coupon_code { width: auto; flex: 1 1 160px; }
body.mssui-cart .cart-collaterals .cart_totals {
	padding: 24px;
	border-radius: var(--mssui-card-radius);
	background: var(--mssui-surface);
}
body.mssui-cart .cart_totals h2 { margin-top: 0; font-size: 1.25rem; font-weight: 700; }
body.mssui-cart .cart_totals table.shop_table {
	border: 0;
	background: transparent;
}
body.mssui-cart .cart_totals table.shop_table :is(th, td) {
	padding: 12px 0;
	border-color: var(--mssui-line);
	background: transparent;
}
body.mssui-cart .wc-proceed-to-checkout a.checkout-button {
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0 22px;
	font-size: 16px;
}
body.mssui-cart .cart_totals .mssui-trust { background: #fff; margin-top: 16px; }

/* ------------------------------------------------------------------ *
 * Checkout
 * ------------------------------------------------------------------ */
body.mssui-checkout .woocommerce-billing-fields > h3,
body.mssui-checkout .woocommerce-shipping-fields > h3,
body.mssui-checkout #order_review_heading,
body.mssui-checkout .woocommerce-additional-fields > h3 {
	margin-bottom: 18px;
	font-size: 1.25rem;
	font-weight: 700;
}
body.mssui-checkout #order_review {
	padding: 24px;
	border-radius: var(--mssui-card-radius);
	background: var(--mssui-surface);
}
body.mssui-checkout #order_review table.shop_table {
	border: 0;
	background: transparent;
}
body.mssui-checkout #order_review table.shop_table :is(th, td) {
	padding: 12px 0;
	border-top: 1px solid var(--mssui-line);
	background: transparent;
}
body.mssui-checkout #order_review table.shop_table thead th { border-top: 0; color: var(--mssui-muted); font-weight: 600; }
body.mssui-checkout #payment {
	margin-top: 16px;
	border: 1px solid var(--mssui-line);
	border-radius: var(--mssui-card-radius);
	background: #fff;
	overflow: hidden;
}
body.mssui-checkout #payment ul.payment_methods {
	margin: 0;
	padding: 8px 16px;
	border-bottom: 1px solid var(--mssui-line);
	list-style: none;
}
body.mssui-checkout #payment ul.payment_methods li { padding: 10px 0; }
body.mssui-checkout #payment ul.payment_methods li label { font-weight: 600; }
body.mssui-checkout #payment div.payment_box {
	margin-top: 10px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--mssui-surface);
	color: var(--mssui-text);
	font-size: 14px;
}
body.mssui-checkout #payment div.payment_box::before { display: none; }
body.mssui-checkout #payment div.form-row { padding: 16px; }
body.mssui-checkout #place_order {
	float: none;
	width: 100%;
	min-height: 56px;
	font-size: 17px;
}
body.mssui-checkout .woocommerce-privacy-policy-text { color: var(--mssui-muted); font-size: 13px; }

/* Block cart + checkout */
body.mssui-checkout .wc-block-components-text-input input,
body.mssui-cart .wc-block-components-text-input input,
body.mssui-checkout .wc-block-components-combobox .components-combobox-control__input {
	border-radius: var(--mssui-btn-radius);
}
body.mssui-checkout .wc-block-components-sidebar,
body.mssui-cart .wc-block-components-sidebar {
	padding: 20px;
	border-radius: var(--mssui-card-radius);
	background: var(--mssui-surface);
}

/* ------------------------------------------------------------------ *
 * My Account
 * ------------------------------------------------------------------ */
body.mssui-account .woocommerce-MyAccount-navigation ul {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
body.mssui-account .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; border: 0; }
body.mssui-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 12px 16px;
	border-radius: 10px;
	color: var(--mssui-muted);
	font-weight: 600;
	text-decoration: none;
}
body.mssui-account .woocommerce-MyAccount-navigation li a:hover { background: var(--mssui-surface); color: var(--mssui-text); }
body.mssui-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--mssui-primary);
	color: var(--mssui-primary-ink);
}
@media (max-width: 767px) {
	body.mssui-account .woocommerce-MyAccount-navigation ul {
		flex-direction: row;
		overflow-x: auto;
		white-space: nowrap;
		padding-bottom: 6px;
	}
}
body.mssui-account :is(.woocommerce-form-login, .woocommerce-form-register, .woocommerce-EditAccountForm fieldset, .woocommerce-address-fields) {
	padding: 24px;
	border: 1px solid var(--mssui-line);
	border-radius: var(--mssui-card-radius);
}
body.mssui-account .woocommerce-orders-table :is(th, td),
body.mssui-account table.shop_table :is(th, td) { padding: 14px 16px; }
body.mssui-account .woocommerce-Address { padding: 20px; border-radius: var(--mssui-card-radius); background: var(--mssui-surface); }
body.mssui-account :is(.woocommerce-form-login__submit, .woocommerce-form-register__submit) { min-height: 50px; }

/* ------------------------------------------------------------------ *
 * Sticky add-to-cart bar (phones only)
 * ------------------------------------------------------------------ */
.mssui-sticky { display: none; }
@media (max-width: 767px) {
	body.mssui-has-sticky { padding-bottom: 76px; }
	.mssui-sticky {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--mssui-line);
		background: #fff;
		box-shadow: 0 -10px 24px -14px rgba(16, 24, 40, .3);
		transform: translateY(110%);
		transition: transform .25s ease;
	}
	.mssui-sticky.is-visible { transform: none; }
	.mssui-sticky__info { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
	.mssui-sticky__title {
		overflow: hidden;
		color: var(--mssui-text);
		font-size: 14px;
		font-weight: 600;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.mssui-sticky__price { color: var(--mssui-text); font-size: 14px; font-weight: 700; }
	.mssui-sticky__price del { color: var(--mssui-muted); font-weight: 400; }
	.mssui-sticky__price ins { background: none; color: var(--mssui-accent); text-decoration: none; }
	.mssui-sticky__btn {
		flex: 0 0 auto;
		min-height: 46px;
		padding: 0 20px;
		border: 0;
		border-radius: var(--mssui-btn-radius);
		background: var(--mssui-accent);
		color: var(--mssui-accent-ink);
		font-size: 15px;
		font-weight: 700;
		cursor: pointer;
	}
}
@media (prefers-reduced-motion: reduce) {
	.mssui-sticky { transition: none; }
	body.mssui * { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ *
 * v1.2: bordered cards, card options, discount badge, chips, colour dots
 * ------------------------------------------------------------------ */

/* Size boxes + colour dots on cards */
.mssui-loop-opts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 12px;
}
.mssui-opts-sizes,
.mssui-opts-colors {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.mssui-opts-colors { gap: 8px; }
.mssui-size {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 7px;
	border: 1px solid var(--mssui-line);
	border-radius: 6px;
	background: #fff;
	color: var(--mssui-text);
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
}
.mssui-size.is-out {
	border-color: #eceef1;
	background: linear-gradient(to top right, transparent calc(50% - 1px), #cfd4da 50%, transparent calc(50% + 1px)), #fff;
	color: #aab1ba;
}
.mssui-dot-s {
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 50%;
	background-position: center;
	background-size: cover;
}
.mssui-dot-s.is-out { opacity: .35; }
.mssui-more { color: var(--mssui-muted); font-size: 12px; font-weight: 600; }

/* Discount badge */
.mssui-off {
	order: 3;
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 6px;
	background: #fdeceb;
	background: color-mix(in srgb, var(--mssui-accent) 12%, #fff);
	color: var(--mssui-accent);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}
body.mssui-offbadge ul.products li.product .onsale { display: none; }

/* Bordered cards */
body.mssui-shop.mssui-cards-bordered ul.products li.product {
	overflow: hidden;
	padding: 0 0 16px;
	border: 1px solid var(--mssui-line);
	border-radius: var(--mssui-card-radius);
	background: #fff;
	transition: border-color .15s ease;
}
body.mssui-shop.mssui-cards-bordered ul.products li.product:hover { border-color: #c5cbd3; }
body.mssui-shop.mssui-cards-bordered ul.products li.product a.woocommerce-LoopProduct-link::before { display: none; }
body.mssui-shop.mssui-cards-bordered ul.products li.product a.woocommerce-LoopProduct-link img {
	margin: 0 0 12px;
	padding: 4%;
	border-radius: 0;
	background: #fff;
	mix-blend-mode: normal;
}
body.mssui-shop.mssui-cards-bordered ul.products li.product :is(.woocommerce-loop-product__title, .price, .star-rating, .mssui-loop-opts, .added_to_cart) {
	margin-left: 16px;
	margin-right: 16px;
}
body.mssui-shop.mssui-cards-bordered ul.products li.product .woocommerce-loop-product__title { margin-bottom: 8px; }
body.mssui-shop.mssui-cards-bordered ul.products li.product .button {
	width: calc(100% - 32px);
	margin: 14px 16px 0;
}
body.mssui-shop.mssui-cards-bordered ul.products li.product .price { font-size: 16px; }

/* Subcategory chips */
.mssui-subcats--chips { margin: 0 0 22px; }
.mssui-subcats--chips .mssui-subcats__track { gap: 10px; padding: 2px 2px 6px; }
.mssui-subcats--chips .mssui-subcats__item { width: auto; }
.mssui-subcats--chips .mssui-subcats__item a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	border: 1px solid var(--mssui-line);
	border-radius: min(var(--mssui-btn-radius), 8px);
	background: #fff;
	color: var(--mssui-text);
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.mssui-subcats--chips .mssui-subcats__item a:hover { border-color: var(--mssui-primary); }
.mssui-subcats--chips .mssui-subcats__name {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.mssui-subcats--chips .mssui-subcats__item.is-current a {
	border-color: var(--mssui-primary);
	background: var(--mssui-primary);
	color: var(--mssui-primary-ink);
}
@media (min-width: 768px) {
	.mssui-subcats--chips .mssui-subcats__arrow:not([hidden]) { top: calc(50% - 23px); }
}

/* Colour dots on the product page (fallback selector) */
.mssui-dots {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mssui-dots li { margin: 0; padding: 0; }
.mssui-dot {
	display: block;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 50%;
	background-color: #ddd;
	color: var(--mssui-text);
	cursor: pointer;
}
.mssui-dot.mssui-dot--text {
	width: auto;
	min-width: 52px;
	height: 46px;
	padding: 0 14px;
	border: 1.5px solid #d3d8de;
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
}
.mssui-dot.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mssui-primary); }
.mssui-dot.mssui-dot--text.is-selected {
	box-shadow: none;
	border-color: var(--mssui-primary);
	background: var(--mssui-primary);
	color: var(--mssui-primary-ink);
}
.mssui-dot.is-disabled { opacity: .35; cursor: not-allowed; }
.mssui-dots__name { display: block; margin-top: 8px; color: var(--mssui-muted); font-size: 13px; }
.mssui-dots__name:empty { display: none; }

/* ------------------------------------------------------------------ *
 * v1.2.1: no card buttons, tidy sale label
 * ------------------------------------------------------------------ */

/* Safety net for themes/blocks that print their own card buttons */
body.mssui-btn-all :is(ul.products li.product .button, ul.products li.product .added_to_cart, .wc-block-grid__product-add-to-cart),
body.mssui-btn-options :is(ul.products li.product a.button.product_type_variable, ul.products li.product a.button.product_type_grouped, ul.products li.product a.button:not(.add_to_cart_button):not(.product_type_external), .wc-block-grid__product-add-to-cart .wp-block-button__link:not(.add_to_cart_button)) {
	display: none !important;
}
body.mssui-btn-all ul.products li.product,
body.mssui-btn-options ul.products li.product { padding-bottom: 18px; }

/* Sale label: small pill in the photo corner (cards use the -% pill by the price) */
body.mssui :is(span.onsale) {
	position: absolute;
	top: 12px;
	left: 12px;
	right: auto;
	z-index: 5;
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 6px 11px;
	border-radius: 999px;
	background: var(--mssui-accent);
	color: var(--mssui-accent-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
}
body.mssui.single-product div.product { position: relative; }
body.mssui.single-product div.product > span.onsale {
	top: 14px !important;
	left: 14px !important;
	right: auto !important;
	z-index: 20;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 7px 13px !important;
	border-radius: 999px !important;
	background: var(--mssui-accent) !important;
	color: var(--mssui-accent-ink) !important;
	font-size: 13px;
	line-height: 1 !important;
}
