/**
 * Kill parent + WooCommerce layout rules that break the MEEM storefront.
 */

.meem-theme,
.meem-theme * {
	text-shadow: none;
	-webkit-text-stroke: 0;
	font-synthesis: none;
}

.meem-theme .site-main,
.meem-theme #content,
.meem-theme #primary,
.meem-theme #main,
body.meem-theme:not([class*="elementor-page-"]) .site-main {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding-inline: 0 !important;
}

body.meem-theme .meem-container {
	width: min(100% - (var(--meem-gutter) * 2), var(--meem-container));
	max-width: var(--meem-container);
	margin-inline: auto;
	box-sizing: border-box;
}

.meem-main,
.meem-home {
	width: 100%;
	max-width: none;
}

.woocommerce-products-header:empty,
.woocommerce-notices-wrapper:empty,
.term-description:empty {
	display: none;
}

.woocommerce-products-header {
	margin: 0 0 0.45rem;
}

.woocommerce-products-header__title,
.woocommerce-products-header .page-title {
	margin: 0 0 0.4rem;
	font-size: clamp(1.55rem, 2.4vw, 2rem);
	line-height: 1.2;
	letter-spacing: -0.03em;
}

.woocommerce-products-header__title::after,
.woocommerce-products-header .page-title::after {
	content: "";
	display: block;
	width: 52px;
	height: 4px;
	margin-block-start: 0.3rem;
	border-radius: 99px;
	background: var(--meem-gradient-brand);
}

.meem-archive__layout {
	display: grid;
	gap: 1rem;
	align-items: start;
	padding-block: 0.25rem 2rem;
}

@media (min-width: 1024px) {
	.meem-archive__layout {
		grid-template-columns: 260px minmax(0, 1fr);
	}
}

.meem-archive__main,
.meem-archive__main .woocommerce,
.meem-archive__main .site-main {
	min-width: 0;
	width: 100% !important;
	max-width: none !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after,
ul.products::before,
ul.products::after {
	content: none !important;
	display: none !important;
}

body.meem-theme .meem-archive ul.products:not(.meem-product-rail):not(.meem-product-spotlight),
body.meem-theme .related.products ul.products,
body.meem-theme .upsells.products ul.products,
body.meem-theme .cross-sells ul.products {
	display: grid !important;
	justify-items: stretch;
	align-items: stretch;
	gap: 1rem !important;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 768px) {
	body.meem-theme .meem-archive ul.products:not(.meem-product-rail):not(.meem-product-spotlight),
	body.meem-theme .related.products ul.products,
	body.meem-theme .upsells.products ul.products,
	body.meem-theme .cross-sells ul.products {
		gap: 1.15rem !important;
	}

	body.meem-theme .meem-archive ul.products.columns-2:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-2,
	body.meem-theme .upsells.products ul.products.columns-2,
	body.meem-theme .cross-sells ul.products.columns-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	body.meem-theme .meem-archive ul.products.columns-3:not(.meem-product-rail),
	body.meem-theme .meem-archive ul.products.columns-4:not(.meem-product-rail),
	body.meem-theme .meem-archive ul.products.columns-5:not(.meem-product-rail),
	body.meem-theme .meem-archive ul.products.columns-6:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-3,
	body.meem-theme .related.products ul.products.columns-4,
	body.meem-theme .related.products ul.products.columns-5,
	body.meem-theme .related.products ul.products.columns-6,
	body.meem-theme .upsells.products ul.products.columns-3,
	body.meem-theme .upsells.products ul.products.columns-4,
	body.meem-theme .upsells.products ul.products.columns-5,
	body.meem-theme .upsells.products ul.products.columns-6,
	body.meem-theme .cross-sells ul.products.columns-3,
	body.meem-theme .cross-sells ul.products.columns-4,
	body.meem-theme .cross-sells ul.products.columns-5,
	body.meem-theme .cross-sells ul.products.columns-6,
	body.meem-theme .meem-archive ul.products:not(.meem-product-rail):not(.meem-product-spotlight):not([class*="columns-"]) {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1024px) {
	body.meem-theme .meem-archive ul.products.columns-2:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-2,
	body.meem-theme .upsells.products ul.products.columns-2,
	body.meem-theme .cross-sells ul.products.columns-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	body.meem-theme .meem-archive ul.products.columns-3:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-3,
	body.meem-theme .upsells.products ul.products.columns-3,
	body.meem-theme .cross-sells ul.products.columns-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	body.meem-theme .meem-archive ul.products.columns-4:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-4,
	body.meem-theme .upsells.products ul.products.columns-4,
	body.meem-theme .cross-sells ul.products.columns-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	body.meem-theme .meem-archive ul.products.columns-5:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-5,
	body.meem-theme .upsells.products ul.products.columns-5,
	body.meem-theme .cross-sells ul.products.columns-5 {
		grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
	}

	body.meem-theme .meem-archive ul.products.columns-6:not(.meem-product-rail),
	body.meem-theme .related.products ul.products.columns-6,
	body.meem-theme .upsells.products ul.products.columns-6,
	body.meem-theme .cross-sells ul.products.columns-6 {
		grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
	}

	body.meem-theme .meem-archive ul.products:not(.meem-product-rail):not(.meem-product-spotlight):not([class*="columns-"]) {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}
}

.woocommerce ul.products:not(.meem-product-rail) li.product,
.woocommerce-page ul.products:not(.meem-product-rail) li.product,
.woocommerce ul.products:not(.meem-product-rail) li.first,
.woocommerce ul.products:not(.meem-product-rail) li.last,
.meem-archive .meem-card {
	float: none !important;
	clear: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0;
	left: auto !important;
	position: relative;
	min-width: 0;
}

.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img,
.meem-card__image {
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
}

.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button,
body.meem-theme .meem-card .button,
body.meem-theme .meem-card .add_to_cart_button,
body.meem-theme .meem-card .meem-card__cart {
	float: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 36px !important;
	height: 36px;
	min-height: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	white-space: nowrap;
	background: #fff !important;
	color: var(--meem-color-ink) !important;
	border: 1.5px solid var(--meem-color-ink) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	font-size: 0;
	line-height: 1;
	text-indent: 0;
	transition:
		background-color 0.28s ease,
		border-color 0.28s ease,
		color 0.2s ease,
		box-shadow 0.28s ease,
		transform 0.34s cubic-bezier(0.34, 1.35, 0.64, 1);
}

body.meem-theme .meem-card .button:hover,
body.meem-theme .meem-card .add_to_cart_button:hover,
body.meem-theme .meem-card .meem-card__cart:hover,
body.meem-theme .meem-card .meem-card__cart:focus-visible {
	background: var(--meem-color-ink) !important;
	color: #fff !important;
}

.woocommerce ul.products li.product .button.is-added,
.woocommerce-page ul.products li.product .button.is-added,
.woocommerce ul.products li.product .button.is-added:hover,
.woocommerce-page ul.products li.product .button.is-added:hover,
body.meem-theme .meem-card .meem-card__cart.is-added,
body.meem-theme .meem-card .meem-card__cart.is-added:hover,
body.meem-theme .meem-card .add_to_cart_button.is-added,
body.meem-theme .meem-card .add_to_cart_button.is-added:hover {
	background: #fff !important;
	color: var(--meem-color-ink) !important;
	border-color: var(--meem-color-success) !important;
	box-shadow: 0 0 0 3px rgba(22, 138, 74, 0.16) !important;
	transform: scale(1.06);
}

@media (hover: none) {
	body.meem-theme .meem-card .button:hover,
	body.meem-theme .meem-card .add_to_cart_button:hover,
	body.meem-theme .meem-card .meem-card__cart:hover {
		background: #fff !important;
		color: var(--meem-color-ink) !important;
		border-color: var(--meem-color-ink) !important;
		box-shadow: none !important;
		transform: none;
	}

	.woocommerce ul.products li.product .button.is-added,
	.woocommerce-page ul.products li.product .button.is-added,
	.woocommerce ul.products li.product .button.is-added:hover,
	.woocommerce-page ul.products li.product .button.is-added:hover,
	body.meem-theme .meem-card .meem-card__cart.is-added,
	body.meem-theme .meem-card .meem-card__cart.is-added:hover,
	body.meem-theme .meem-card .add_to_cart_button.is-added,
	body.meem-theme .meem-card .add_to_cart_button.is-added:hover {
		background: #fff !important;
		color: var(--meem-color-ink) !important;
		border-color: var(--meem-color-success) !important;
		box-shadow: 0 0 0 3px rgba(22, 138, 74, 0.16) !important;
		transform: scale(1.06);
	}
}

body.meem-theme .meem-card .added_to_cart {
	display: none !important;
}

body.meem-theme .meem-card .add_to_cart_button.loading {
	color: transparent !important;
}

body.meem-theme .meem-card .add_to_cart_button.loading::after {
	content: "" !important;
	position: absolute !important;
	inset: 0 !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	margin: auto !important;
	width: 16px !important;
	height: 16px !important;
	background: none !important;
	font-family: inherit !important;
	border: 2px solid rgba(22, 26, 51, 0.2) !important;
	border-block-start-color: var(--meem-color-ink) !important;
	border-radius: 50% !important;
	animation: meem-spin 0.6s linear infinite !important;
}

body.meem-theme .meem-card .meem-price,
body.meem-theme .meem-card .meem-price ins,
body.meem-theme .meem-card .meem-price .amount,
body.meem-theme.single-product .summary .price,
body.meem-theme.single-product .summary .price ins,
body.meem-theme.single-product .summary .price .amount {
	color: var(--meem-color-ink);
}

body.meem-theme .meem-card .meem-price del,
body.meem-theme .meem-card .meem-price del .amount,
body.meem-theme.single-product .summary .price del,
body.meem-theme.single-product .summary .price del .amount {
	color: var(--meem-color-muted);
	text-decoration: line-through;
}

@media (max-width: 767px) {
	.woocommerce ul.products li.product .button,
	.woocommerce-page ul.products li.product .button,
	body.meem-theme .meem-card .button,
	body.meem-theme .meem-card .add_to_cart_button,
	body.meem-theme .meem-card .meem-card__cart {
		width: 32px !important;
		height: 32px;
		min-height: 32px !important;
	}
}

.related.products ul.products,
.upsells.products ul.products {
	display: grid !important;
}

/* Cart + checkout: wrappers beat WooCommerce 48% floats. */
body.meem-theme .meem-cart-layout,
body.meem-theme .meem-checkout-layout {
	display: grid;
	gap: 1.5rem;
	align-items: start;
	width: 100%;
}

body.meem-theme .meem-cart-layout__main,
body.meem-theme .meem-cart-layout__aside,
body.meem-theme .meem-checkout-layout__main,
body.meem-theme .meem-checkout-layout__aside {
	min-width: 0;
}

@media (min-width: 1024px) {
	body.meem-theme .meem-cart-layout {
		grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
	}

	body.meem-theme .meem-checkout-layout {
		grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
	}

	body.meem-theme .meem-cart-layout__aside,
	body.meem-theme .meem-checkout-layout__aside {
		position: sticky;
		inset-block-start: 96px;
	}
}

body.meem-theme.woocommerce-checkout form.checkout {
	display: block !important;
	width: 100% !important;
	float: none !important;
}

body.meem-theme.woocommerce-checkout #customer_details,
body.meem-theme.woocommerce-checkout #customer_details.col2-set,
body.meem-theme.woocommerce-checkout .meem-checkout-layout__main .col2-set {
	display: flex !important;
	flex-direction: column !important;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	gap: 1rem;
}

body.meem-theme.woocommerce-checkout #customer_details .col-1,
body.meem-theme.woocommerce-checkout #customer_details .col-2,
body.meem-theme.woocommerce-checkout #customer_details .u-column1,
body.meem-theme.woocommerce-checkout #customer_details .u-column2,
body.meem-theme.woocommerce-checkout .col2-set .col-1,
body.meem-theme.woocommerce-checkout .col2-set .col-2 {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	clear: none !important;
	margin: 0 !important;
}

body.meem-theme.woocommerce-checkout #customer_details::before,
body.meem-theme.woocommerce-checkout #customer_details::after,
body.meem-theme.woocommerce-checkout .col2-set::before,
body.meem-theme.woocommerce-checkout .col2-set::after {
	content: none !important;
	display: none !important;
}

body.meem-theme.woocommerce-cart form.woocommerce-cart-form,
body.meem-theme.woocommerce-cart .woocommerce-cart-form,
body.meem-theme.woocommerce-cart .cart-collaterals,
body.meem-theme.woocommerce-cart .cart-collaterals .cart_totals,
body.meem-theme.woocommerce-cart .meem-cart-layout .cart-collaterals,
body.meem-theme.woocommerce-cart .meem-cart-layout .cart_totals {
	float: none !important;
	width: auto;
	max-width: none !important;
	clear: none !important;
}

body.meem-theme.woocommerce-cart table.cart td.actions .coupon {
	float: left !important;
	display: flex;
	align-items: center;
	width: calc(100% - 10.5rem) !important;
	min-width: 0;
	max-width: none !important;
	clear: none !important;
	box-sizing: border-box;
}

body.meem-theme.woocommerce-cart table.cart td.actions .coupon .button {
	float: none !important;
	flex: 0 0 auto;
	width: auto;
	max-width: none !important;
	clear: none !important;
}

body.meem-theme.woocommerce-cart table.cart td.actions > .button {
	float: right !important;
	flex: 0 0 auto;
	width: auto;
	max-width: none !important;
	clear: none !important;
}

@media (max-width: 767px) {
	body.meem-theme.woocommerce-cart table.cart td.actions {
		display: flex !important;
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
		width: 100% !important;
		box-sizing: border-box;
	}

	body.meem-theme.woocommerce-cart table.cart td.actions .coupon {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		float: none !important;
		width: 100% !important;
		gap: 0.65rem;
	}

	body.meem-theme.woocommerce-cart table.cart td.actions .coupon .input-text {
		display: block !important;
		flex: 1 1 auto !important;
		width: 100% !important;
		max-width: none !important;
		min-height: 48px;
		box-sizing: border-box;
	}

	body.meem-theme.woocommerce-cart table.cart td.actions .coupon .button,
	body.meem-theme.woocommerce-cart table.cart td.actions > .button {
		display: flex !important;
		align-items: center;
		justify-content: center;
		float: none !important;
		width: 100% !important;
		min-height: 48px;
		box-sizing: border-box;
	}
}

body.meem-theme.woocommerce-cart form.woocommerce-cart-form,
body.meem-theme.woocommerce-cart .cart-collaterals,
body.meem-theme.woocommerce-cart .meem-cart-layout .cart-collaterals,
body.meem-theme.woocommerce-cart .meem-cart-layout .cart_totals {
	width: 100% !important;
	margin: 0 !important;
}

body.meem-theme.woocommerce-cart table.shop_table {
	margin: 0 !important;
}

body.meem-theme #customer_login,
body.meem-theme #customer_login.col2-set,
body.meem-theme #customer_login.u-columns {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	width: 100% !important;
	float: none !important;
}

@media (min-width: 768px) {
	body.meem-theme #customer_login,
	body.meem-theme #customer_login.col2-set,
	body.meem-theme #customer_login.u-columns {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
}

body.meem-theme #customer_login .col-1,
body.meem-theme #customer_login .col-2,
body.meem-theme #customer_login .u-column1,
body.meem-theme #customer_login .u-column2 {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
}

/* Product page: kill WooCommerce 48% gallery/summary floats. */
body.meem-theme.single-product div.product,
body.meem-theme.single-product #content div.product {
	display: flex !important;
	flex-direction: column;
	gap: 2rem;
	float: none !important;
	width: 100% !important;
}

body.meem-theme .meem-pdp-hero {
	position: relative;
	display: grid;
	gap: 1.5rem;
	align-items: start;
	width: 100%;
}

body.meem-theme .meem-pdp-hero > .onsale {
	position: absolute;
	z-index: 2;
}

body.meem-theme .meem-pdp-hero .woocommerce-product-gallery,
body.meem-theme .meem-pdp-hero div.images,
body.meem-theme .meem-pdp-hero .summary,
body.meem-theme.single-product div.product div.images,
body.meem-theme.single-product div.product div.summary,
body.meem-theme.single-product #content div.product div.images,
body.meem-theme.single-product #content div.product div.summary {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	clear: none !important;
	margin: 0 !important;
}

@media (min-width: 900px) {
	body.meem-theme .meem-pdp-hero {
		grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
	}

	body.meem-theme .meem-pdp-hero .woocommerce-product-gallery,
	body.meem-theme .meem-pdp-hero div.images {
		grid-column: 1;
	}

	body.meem-theme .meem-pdp-hero .summary {
		grid-column: 2;
	}
}

body.meem-theme.single-product form.cart,
body.meem-theme.single-product div.product form.cart {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
	float: none !important;
	width: 100% !important;
	margin: 1rem 0 0 !important;
}

body.meem-theme.single-product form.cart .quantity {
	float: none !important;
	width: 11rem !important;
	max-width: 100% !important;
	margin: 0 !important;
}

body.meem-theme.single-product form.cart .single_add_to_cart_button,
body.meem-theme.single-product form.cart .meem-buy-now {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

body.meem-theme .woocommerce-tabs,
body.meem-theme .woocommerce-tabs.wc-tabs-wrapper {
	background: var(--meem-color-surface) !important;
	border: 1px solid var(--meem-color-border) !important;
	border-radius: var(--meem-radius) !important;
	padding: 0 !important;
	overflow: hidden;
	box-shadow: var(--meem-shadow);
}

body.meem-theme .woocommerce-tabs ul.tabs,
body.meem-theme .woocommerce-tabs ul.wc-tabs,
body.meem-theme.single-product .woocommerce-tabs ul.tabs {
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0 !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 1.25rem !important;
	list-style: none !important;
	overflow: visible !important;
	float: none !important;
	background: var(--meem-color-cream) !important;
	border: 0 !important;
	border-radius: 0 !important;
	border-block-end: 1px solid var(--meem-color-border) !important;
}

body.meem-theme .woocommerce-tabs ul.tabs::before,
body.meem-theme .woocommerce-tabs ul.tabs::after,
body.meem-theme .woocommerce-tabs ul.tabs li::before,
body.meem-theme .woocommerce-tabs ul.tabs li::after {
	content: none !important;
	display: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

body.meem-theme .woocommerce-tabs ul.tabs li,
body.meem-theme.single-product .woocommerce-tabs ul.tabs li {
	display: block !important;
	float: none !important;
	position: relative !important;
	z-index: 1 !important;
	margin: 0 1.5rem 0 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
}

body.meem-theme .woocommerce-tabs ul.tabs li a {
	display: block !important;
	padding: 1rem 0 0.9rem !important;
	color: var(--meem-color-muted) !important;
	font-weight: 700 !important;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none !important;
	text-shadow: none !important;
	border: 0 !important;
	white-space: nowrap;
}

body.meem-theme .woocommerce-tabs ul.tabs li.active a,
body.meem-theme .woocommerce-tabs ul.tabs li a:hover,
body.meem-theme .woocommerce-tabs ul.tabs li a:focus-visible {
	color: var(--meem-color-primary) !important;
}

body.meem-theme .woocommerce-tabs ul.tabs li.active::after {
	content: "" !important;
	display: block !important;
	position: absolute;
	inset-inline: 0;
	inset-block-end: -1px;
	height: 3px;
	border: 0 !important;
	border-radius: 99px 99px 0 0;
	background: var(--meem-gradient-brand);
	box-shadow: none !important;
}

body.meem-theme .woocommerce-tabs .panel,
body.meem-theme .woocommerce-tabs .woocommerce-Tabs-panel {
	margin: 0 !important;
	padding: 1.25rem 1.35rem 1.45rem !important;
	border: 0 !important;
	background: var(--meem-color-surface) !important;
}

body.meem-theme .woocommerce-tabs .panel p {
	margin: 0 0 0.75rem;
	color: var(--meem-color-text);
	line-height: 1.65;
}

body.meem-theme .woocommerce-tabs .panel p:last-child {
	margin-block-end: 0;
}

body.meem-theme .related.products,
body.meem-theme .upsells.products {
	float: none !important;
	width: 100% !important;
	clear: both;
}

body.meem-theme .related.products ul.products li.product,
body.meem-theme .upsells.products ul.products li.product {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

/* Account: kill WooCommerce 30%/70% floats so tabs stay in the wrapper. */
body.meem-theme.woocommerce-account .meem-account-layout,
body.meem-theme.woocommerce-account .woocommerce-MyAccount-navigation,
body.meem-theme.woocommerce-account .woocommerce-MyAccount-content {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
}

@media (min-width: 900px) {
	body.meem-theme.woocommerce-account .meem-account-layout {
		display: grid !important;
		grid-template-columns: 240px minmax(0, 1fr);
	}
}
