/*
Theme Name: Manifest Tier 1
Theme URI: https://manifestdigital.id/themes/tier1
Author: Manifest Digital Kreatif
Author URI: https://manifestdigital.id
Description: Editorial premium e-commerce theme untuk UMKM Indonesia. Bagian dari Manifest Tier 1 Migration package. Auto-integrates dengan Manifest plugin untuk badges, trust strip, WA-CS, restock form. Brand: teal #0F766E + warm gradient + Playfair Display + Crimson Pro typography.
Version: 1.1.7
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manifest-tier1
Tags: e-commerce, woocommerce, indonesia, editorial, premium, custom-logo, custom-menu, threaded-comments
*/

/* ============================================================
   CSS Variables — Brand Tokens (sync dengan template-01)
   ============================================================ */
:root {
	--color-bg: #FAF8F5;
	--color-bg-elevated: #FFFFFF;
	--color-bg-subtle: #F5F2ED;
	--color-text: #1A1A1A;
	--color-text-secondary: #525252;
	--color-text-tertiary: #6B6B6B;
	--color-primary: #0F766E;
	--color-primary-hover: #0E6B64;
	--color-accent: #D4A75A;
	--color-accent-hover: #C19A4D;
	--color-border: #E5E5E5;
}

/* ============================================================
   Base typography
   ============================================================ */
body {
	font-family: var(--font-body, 'Crimson Pro'), Georgia, serif;
	background-color: var(--color-bg);
	color: var(--color-text);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display, 'Playfair Display'), 'Times New Roman', Georgia, serif;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--color-text);
	margin: 0 0 0.5em;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s; }
/* Buttons keep their own label colour on hover.
   `a` (0,0,1) above is correctly outranked by a Tailwind text-* utility (0,1,0), so a
   solid CTA renders `text-white` at rest. A bare `a:hover` (0,1,1) would OUTRANK that
   same utility and repaint the label to --color-primary-hover mid-hover (dark text on a
   dark fill). Excluding anchors that carry a BACKGROUND utility (= buttons) keeps the
   hover state consistent with the rest state.

   The three tests match a real background utility only — `bg-*` at the start of the
   attribute, ` bg-*` after a space, and `:bg-*` behind a variant (hover:/md:/focus:).
   A plain `*="bg-"` substring test would ALSO catch tokens that merely CONTAIN "bg-"
   but paint no background — `text-bg-base`, `border-bg-*`, `focus-visible:ring-offset-bg-base`
   (product cards) — and silently exclude those links too.

   `:not(:where(...))` contributes ZERO specificity, so this stays (0,1,1): every other
   link hovers exactly as before, and a button that DOES want a hover colour still
   declares `hover:text-*` (0,2,0), which wins over this. */
a:not(:where([class^="bg-"], [class*=" bg-"], [class*=":bg-"])):hover { color: var(--color-primary-hover); }
a:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }

p { margin: 0 0 1em; }

/* ============================================================
   Helper classes (subset dari template-01 critical)
   ============================================================ */
.font-display { font-family: var(--font-display, 'Playfair Display'), 'Times New Roman', Georgia, serif; letter-spacing: -0.02em; line-height: 1.05; }
.font-body    { font-family: var(--font-body, 'Crimson Pro'), Georgia, serif; }

.text-caption {
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 500;
}

.bg-warm-gradient {
	background: linear-gradient(135deg, #FAF8F5 0%, #F0EBE3 100%);
}

.btn-lift {
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}
.btn-lift:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -8px rgba(15, 118, 110, 0.25);
}

/* ============================================================
   Layout — site wrapper, container, content
   ============================================================ */
.mt-site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.mt-container {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1rem;
}

@media (min-width: 1024px) {
	.mt-container { padding: 0 2rem; }
}

.mt-content {
	flex: 1;
	padding: 2rem 0;
}

/* ============================================================
   Header (sticky + backdrop blur)
   ============================================================ */
.mt-announce {
	background: var(--color-text);
	color: var(--color-bg);
	padding: 0.5rem 1rem;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: center;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
@media (max-width: 640px) {
	.mt-announce {
		font-size: 0.6875rem;
		letter-spacing: 0.06em;
		padding: 0.5rem 0.75rem;
	}
}

.mt-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(250, 248, 245, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--color-border);
}

.mt-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4rem;
}

@media (min-width: 768px) {
	.mt-header-inner { height: 5rem; }
}

.mt-logo {
	font-family: var(--font-display, 'Playfair Display'), 'Times New Roman', Georgia, serif;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--color-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60vw;
	text-decoration: none;
}
@media (max-width: 640px) {
	.mt-logo {
		font-size: 1.125rem;
		max-width: 55vw;
	}
}
@media (max-width: 380px) {
	.mt-logo {
		font-size: 1rem;
	}
}

.mt-logo .brand-dot { color: var(--color-primary); }

.mt-nav {
	display: none;
	align-items: center;
	gap: 2rem;
	font-size: 0.875rem;
	font-weight: 500;
}

@media (min-width: 768px) {
	.mt-nav { display: flex; }
}

.mt-nav a {
	color: var(--color-text);
	transition: color 0.15s;
}

.mt-nav a:hover, .mt-nav a[aria-current="page"] {
	color: var(--color-primary);
}

.mt-header-icons {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.mt-header-icons a {
	padding: 0.5rem;
	color: var(--color-text);
	display: flex;
	align-items: center;
	justify-content: center;
	/* WCAG 2.5.5 — min 44x44 tap target (was ~36px around the 20px glyph). */
	min-width: 44px;
	min-height: 44px;
	position: relative;
}

.mt-cart-badge {
	position: absolute;
	/* Hug the cart glyph after the link box grew to 44px. */
	top: 0.375rem;
	right: 0.375rem;
	background: var(--color-accent);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 600;
	border-radius: 9999px;
	width: 1rem;
	height: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ============================================================
   Footer
   ============================================================ */
.mt-footer {
	background: var(--color-bg-subtle);
	color: var(--color-text);
	padding: 4rem 0 2rem;
	border-top: 1px solid var(--color-border);
	margin-top: 4rem;
}

.mt-footer-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	margin-bottom: 3rem;
}

@media (min-width: 768px) {
	.mt-footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.mt-footer-brand {
	grid-column: span 2;
}

.mt-footer-grid > *, .mt-footer-bottom > * { min-width: 0; }
.mt-footer-brand .mt-logo { max-width: 100%; white-space: normal; }
.mt-footer-logo { width: var(--footer-logo-width, 144px); height: auto; max-height: 160px; object-fit: contain; object-position: left; }
.mt-footer-socials { display: flex; gap: .75rem; flex-wrap: wrap; }
.mt-footer-socials .mt-social-icon { width: 44px; height: 44px; }
.mt-footer[data-social-style="outline"] .mt-social-icon { background: transparent; color: var(--color-text); border: 1px solid currentColor; }
.mt-footer[data-social-style="plain"] .mt-social-icon { background: transparent; color: var(--color-text); }
.mt-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.mt-footer[data-layout="stacked"] .mt-footer-brand { grid-column: 1 / -1; }
.mt-footer[data-density="compact"] { padding-top: 2rem; }
.mt-footer[data-density="compact"] .mt-footer-grid { gap: 1.25rem; margin-bottom: 1.5rem; }
.mt-footer-channels { display: grid; grid-template-columns: fit-content(35%) auto minmax(0, 1fr); gap: .75rem .5rem; align-items: start; max-width: 100%; min-width: 0; flex: 1 1 55%; }
.mt-footer-channel-label, .mt-footer-channel-separator { font-weight: 700; color: var(--color-text); padding-top: .65rem; overflow-wrap: anywhere; }
.mt-footer-credits { flex: 1 1 35%; }
.mt-platform-badge { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 72px; min-height: 40px; padding: 6px 10px; border: 1px solid #dbe0e5; border-radius: 6px; background: #fff; color: #1a1a1a; font: 600 12px/1.4 sans-serif; }
.mt-platform-badge img { display: block; width: 80px; height: 28px; object-fit: contain; }
.mt-platform-badge--ovo { background: #4c3494; border-color: #4c3494; }
.mt-platform-badge--tokopedia { background: #167a3b; border-color: #167a3b; }
.mt-platform-badge--jnt img { object-fit: cover; }
.mt-platform-badge--doku-va img { width: 64px; }
.mt-platform-badge--doku-va small { width: 16px; text-align: right; font-size: 9px; }
.mt-marketplace-links a { display: inline-flex; min-height: 44px; text-decoration: none; }
.mt-marketplace-links a:hover .mt-platform-badge { border-color: #64748b; box-shadow: 0 2px 6px #00000014; }
@media (max-width: 767px) {
	.mt-footer-channels { grid-template-columns: minmax(0, 1fr); width: 100%; }
	.mt-footer-channel-separator { display: none; }
	.mt-footer-channel-label { padding-top: .25rem; }
	.mt-footer-credits { width: 100%; }
}

@media (min-width: 768px) {
	.mt-footer-brand { grid-column: span 1; }
}

/* ============================================================
   Featured products slider (homepage)
   ============================================================ */
.mt-featured-slider .mt-slider-track::-webkit-scrollbar { display: none; }

.mt-slider-card {
	width: calc(50% - 0.5rem); /* mobile: 2 visible (gap-4 = 1rem total split) */
}
@media (min-width: 640px) {
	.mt-slider-card {
		width: calc(33.333% - 1rem); /* sm: 3 visible */
	}
}
@media (min-width: 768px) {
	.mt-slider-card {
		width: calc(25% - 1.125rem); /* md+: 4 visible (gap-6 = 1.5rem) */
	}
}

.mt-slider-arrow {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 9999px;
	background: var(--color-bg-elevated);
	color: var(--color-text);
	border: 1px solid var(--color-border);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	transition: all 0.2s;
	z-index: 5;
	padding: 0;
}
.mt-slider-arrow:hover {
	background: var(--color-primary);
	color: var(--color-bg-elevated);
	border-color: var(--color-primary);
	transform: translateY(-50%) scale(1.05);
}
.mt-slider-arrow-prev {
	left: -1.25rem;
}
.mt-slider-arrow-next {
	right: -1.25rem;
}

.mt-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 9999px;
	background: var(--color-text);
	color: var(--color-bg);
	transition: background 0.15s, transform 0.15s;
	text-decoration: none;
}
.mt-social-icon:hover {
	background: var(--color-primary);
	transform: translateY(-2px);
}

.mt-footer h4 {
	font-family: var(--font-body, 'Crimson Pro'), Georgia, serif;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 600;
	margin-bottom: 1rem;
}

.mt-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mt-footer li {
	margin-bottom: 0.75rem;
	font-size: 0.875rem;
}

.mt-footer li a {
	color: var(--color-text-secondary);
}

.mt-footer li a:hover {
	color: var(--color-primary);
}

.mt-footer-bottom {
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: center;
	font-size: 0.75rem;
	color: var(--color-text-tertiary);
}

@media (min-width: 768px) {
	.mt-footer-bottom { flex-direction: row; justify-content: space-between; }
}

.mt-payment-badges, .mt-courier-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	align-items: center;
}

.mt-payment-badges span, .mt-courier-badges span {
	display: inline-block;
}

.mt-pill {
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	padding: 0.25rem 0.5rem;
	border-radius: 2px;
	color: #fff;
}

/* ============================================================
   WhatsApp floating button
   ============================================================ */
.mt-wa-float {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 50;
	width: 3.5rem;
	height: 3.5rem;
	background: #25D366;
	color: #fff;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
	animation: wa-pulse 2.5s ease-in-out infinite;
	transition: transform 0.2s;
}
@media (max-width: 640px) {
	.mt-wa-float {
		width: 3rem;
		height: 3rem;
		bottom: 1rem;
		right: 1rem;
	}
}

/* On mobile product pages the sticky "Beli Sekarang" buy bar sits at the
   bottom; the WhatsApp float would overlap its right edge and steal taps.
   The PDP already provides its own WA-CS button, so hide the float there. */
@media (max-width: 767px) {
	body.single-product .mt-wa-float { display: none !important; }
}

.mt-wa-float:hover { transform: scale(1.1); color: #fff; }

@keyframes wa-pulse {
	0%, 100% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
	50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}

/* ============================================================
   Buttons (generic baseline)
   ============================================================ */
.mt-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	border-radius: 0.375rem;
	font-weight: 500;
	font-size: 1rem;
	border: 0;
	cursor: pointer;
	transition: background 0.15s, transform 0.2s;
	text-decoration: none;
}

.mt-btn-primary {
	background: var(--color-primary);
	color: #fff;
}

.mt-btn-primary:hover {
	background: var(--color-primary-hover);
	color: #fff;
}

.mt-btn-secondary {
	background: transparent;
	color: var(--color-text);
	border: 2px solid var(--color-text);
}

.mt-btn-secondary:hover {
	background: var(--color-text);
	color: var(--color-bg);
}

/* ============================================================
   WooCommerce integration — minimal styling override
   ============================================================ */

/* Shop page product loop */
.woocommerce ul.products li.product {
	background: var(--color-bg-elevated);
	border-radius: 0.5rem;
	overflow: hidden;
	border: 1px solid var(--color-border);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-4px);
}

.woocommerce ul.products li.product .price {
	color: var(--color-primary);
	font-weight: 700;
}

/* Product page */
.woocommerce div.product .product_title {
	font-family: var(--font-display, 'Playfair Display'), 'Times New Roman', Georgia, serif;
	letter-spacing: -0.02em;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--color-primary);
	font-size: 1.5rem;
	font-weight: 700;
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background: var(--color-primary);
	color: #fff;
	border-radius: 0.375rem;
	font-weight: 500;
	padding: 0.75rem 1.5rem;
	transition: background 0.15s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover {
	background: var(--color-primary-hover);
	color: #fff;
}

/* Specificity bump — WC's button.alt.single_add_to_cart_button wins over generic rule above */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt {
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-body, 'Crimson Pro'), Georgia, serif;
	font-weight: 600;
	padding: 0.875rem 1.75rem;
	border-radius: 0.375rem;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button.alt:hover {
	background: var(--color-primary-hover);
	color: #fff;
}

/* Proceed to Checkout — covers BOTH legacy shortcode + WC Blocks Cart */
.woocommerce .cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.button.alt {
	background: var(--color-primary);
	color: #fff;
	font-weight: 600;
	padding: 1rem 2rem;
	border-radius: 0.375rem;
	display: block;
	text-align: center;
	font-size: 1rem;
	transition: background 0.15s;
}

.woocommerce .cart .wc-proceed-to-checkout a.checkout-button:hover {
	background: var(--color-primary-hover);
	color: #fff;
}

/* WC Blocks Cart — React block render, different selectors */
.wp-block-woocommerce-proceed-to-checkout-block a.wc-block-cart__submit-button,
a.wc-block-cart__submit-button,
a.wc-block-cart__submit-button.contained,
.wc-block-cart__submit-container a.wp-element-button {
	background-color: var(--color-primary) !important;
	color: #fff !important;
	padding: 1rem 2rem !important;
	font-weight: 600 !important;
	text-align: center !important;
	display: block !important;
	border-radius: 0.375rem !important;
	font-size: 1rem !important;
	text-decoration: none !important;
	transition: background 0.15s;
}

.wp-block-woocommerce-proceed-to-checkout-block a.wc-block-cart__submit-button:hover,
a.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-container a.wp-element-button:hover {
	background-color: var(--color-primary-hover) !important;
	color: #fff !important;
}

/* WC Blocks Checkout — Place Order button */
.wc-block-components-checkout-place-order-button,
button.wc-block-components-checkout-place-order-button {
	background-color: var(--color-primary) !important;
	color: #fff !important;
	font-weight: 600 !important;
	font-family: var(--font-body, 'Crimson Pro'), Georgia, serif !important;
	border-radius: 0.375rem !important;
	padding: 1rem 2rem !important;
}

.wc-block-components-checkout-place-order-button:hover {
	background-color: var(--color-primary-hover) !important;
}

/* Place Order button at checkout — also enforce solid teal */
.woocommerce-checkout #payment #place_order {
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-body, 'Crimson Pro'), Georgia, serif;
	font-weight: 600;
	padding: 1rem 2rem;
	border-radius: 0.375rem;
}

.woocommerce-checkout #payment #place_order:hover {
	background: var(--color-primary-hover);
}

/* Disabled state — gray, not blue */
.woocommerce-checkout #payment #place_order:disabled,
.woocommerce-checkout #payment #place_order[disabled] {
	background: #9ca3af;
	color: #fff;
	cursor: not-allowed;
}

/* Cart + checkout */
.woocommerce-cart-form table th,
.woocommerce-checkout table th {
	font-family: var(--font-body, 'Crimson Pro'), Georgia, serif;
	color: var(--color-text);
}

.woocommerce-info, .woocommerce-message {
	border-top-color: var(--color-primary);
}

.woocommerce-info::before, .woocommerce-message::before {
	color: var(--color-primary);
}

/* ============================================================
   Manifest plugin Frontend module element compat
   (manifest-fe-* classes — sudah punya CSS sendiri di plugin,
    di sini cuma sync color tokens supaya tidak conflict)
   ============================================================ */

.manifest-fe-badge { background: var(--color-primary); }
.manifest-fe-restock { background: var(--color-bg-subtle); }

/* ============================================================
   Accessibility
   ============================================================ */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--color-primary);
	color: #fff;
	clip: auto !important;
	clip-path: none;
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ============================================================
   Image responsive
   ============================================================ */
img {
	max-width: 100%;
	height: auto;
}

/* Mobile menu toggle (server-side fallback for no-JS) */
.mt-mobile-toggle {
	display: inline-flex;
	background: none;
	border: 0;
	padding: 0.75rem;
	cursor: pointer;
	color: var(--color-text);
}

@media (min-width: 768px) {
	.mt-mobile-toggle { display: none; }
}

/* ============================================================
   Modal scroll-lock — supports MfstApp.modal.lock() body.no-scroll
   Wave C P1-2 (focus-trap LIFO). Lock body scroll while modal open.
   ============================================================ */
/* Robust scroll-lock for EVERY modal (zoom, mobile drawer, cookie consent, thank-you).
   overflow:hidden alone is NOT enough: an overflow:hidden box is still a scroll
   container (programmatic scrollTo/scrollTop still moves it — verified live: html+body
   both hidden yet window.scrollY still changed) and iOS Safari ignores body overflow.
   position:fixed collapses the document to the viewport so there is NOTHING to scroll,
   user or programmatic. MfstApp.modal.lock() sets an inline top:-scrollY to preserve
   the visual position and restores scroll on the last unlock(). The html:has() rule
   kills the (now-empty) root scroller + its scrollbar for the lock duration. */
html:has(body.no-scroll) {
	overflow: hidden;
}
body.no-scroll {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	overflow: hidden;
	touch-action: none;
}

/* ============================================================
   TOAST — programmatic notifications
   Wave C C1-1 (P1-3 closure). Ported from _design-system/components.css
   L2446-2538 with CANONICAL theme var conventions (--color-*).
   Layout primitives hardcoded; status colors hardcoded brand-accessible.
   ============================================================ */
.toast-container {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	z-index: 9999;
	display: flex;
	flex-direction: column-reverse;
	gap: 0.5rem;
	max-width: calc(100vw - 2rem);
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	min-width: 18rem;
	max-width: 24rem;
	padding: 1rem;
	border-radius: 0.5rem;
	background: var(--color-bg-elevated, #FFFFFF);
	color: var(--color-text, #1A1A1A);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
	border-left: 4px solid var(--color-text-tertiary, #6B7280);
	font-size: 0.9375rem;
	line-height: 1.5;
	pointer-events: auto;
	transform: translateX(0);
	opacity: 1;
	transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.toast.is-entering {
	transform: translateX(120%);
	opacity: 0;
}
.toast.is-leaving {
	transform: translateX(120%);
	opacity: 0;
}

.toast-icon {
	flex-shrink: 0;
	width: 1.5rem;
	height: 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	color: #FFFFFF;
	font-size: 0.875rem;
	font-weight: 700;
	background: var(--color-text-tertiary, #6B7280);
}

.toast-body { flex: 1; min-width: 0; }
.toast-message { word-wrap: break-word; }

.toast-action {
	background: transparent;
	color: var(--color-primary, #0F766E);
	font-weight: 600;
	font-size: 0.875rem;
	padding: 0.25rem 0.5rem;
	margin-left: 0.25rem;
	white-space: nowrap;
	cursor: pointer;
	border: none;
	border-radius: 0.25rem;
}
.toast-action:hover { background: var(--color-bg-subtle, #F3F4F6); }

.toast-close {
	/* WCAG 2.5.5 touch target ≥44px */
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	color: var(--color-text-tertiary, #6B7280);
	background: transparent;
	border: none;
	border-radius: 9999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.toast-close:hover { background: var(--color-bg-subtle, #F3F4F6); }

.toast-success { border-left-color: #16A34A; }
.toast-success .toast-icon { background: #16A34A; }
.toast-info    { border-left-color: var(--color-primary, #0F766E); }
.toast-info    .toast-icon { background: var(--color-primary, #0F766E); }
.toast-warning { border-left-color: #D97706; }
.toast-warning .toast-icon { background: #D97706; }
.toast-error   { border-left-color: #DC2626; }
.toast-error   .toast-icon { background: #DC2626; }

/* Native add-to-cart success becomes a floating toast, including Buy Now.
   Only marked successes are hidden while JS initializes; errors stay inline. */
html[data-mfst-cart-toasts] .woocommerce-message:has(.mfst-cart-notice) {
	display: none;
}
.toast-container-cart {
	top: calc(max(1rem, env(safe-area-inset-top)) + var(--wp-admin--admin-bar--height, 0px));
	bottom: auto;
	width: 24rem;
	max-width: calc(100% - 2rem);
	flex-direction: column;
}
.toast-cart {
	display: grid;
	grid-template-columns: 1.5rem minmax(0, 1fr) 2.75rem;
	width: 100%;
	min-width: 0;
	border-left-color: var(--color-primary, #0F766E);
}
.toast-cart .toast-icon { background: var(--color-primary, #0F766E); }
.toast-cart .toast-body { overflow-wrap: anywhere; }
.toast-cart .toast-action {
	grid-column: 2;
	justify-self: start;
	margin-left: 0;
	padding: 0.5rem 0;
	min-height: 2.75rem;
	white-space: normal;
}
.toast-cart .toast-close { grid-column: 3; grid-row: 1 / span 2; }
.toast-cart.is-entering, .toast-cart.is-leaving { transform: translateY(-0.5rem); }

@media (prefers-reduced-motion: reduce) {
	.toast { transition: opacity 0.15s linear; }
	.toast.is-entering, .toast.is-leaving { transform: translateX(0); }
}

/* ============================================================
   Cart stock-conflict markers — Wave C C2 P1-5 (cart polling).
   Applied per <.cart-line[data-cart-line]> when the 30s
   /cart/stock-check poll reports a product went out-of-stock OR
   requested_qty exceeds available_qty. Mirrors the static-template
   conflict UX so customers see the conflict inline (not just a
   transient toast) and the Checkout button is visibly disabled.
   ============================================================ */
.cart-line.is-conflict {
	opacity: 0.7;
	background: var(--color-bg-subtle, #F3F4F6);
	border-color: #DC2626;
}
[data-checkout-btn].is-disabled,
[data-checkout-btn][aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* ============================================================
   Shop sort dropdown — WC default renders ~22px tall, below the
   44px min tap target. Brand it + give it a comfortable height.
   ============================================================ */
.woocommerce-ordering select.orderby {
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--color-border, #E5E5E5);
	border-radius: 0.375rem;
	background-color: #fff;
	color: var(--color-text, #1A1A1A);
	font-size: 0.875rem;
}

/* Product names can be long; keep price and variation choices easy to reach. */
.manifest-product-title {
	font-size: clamp(1.375rem, 1.125rem + 0.75vw, 1.75rem);
	line-height: 1.35;
	overflow-wrap: anywhere;
}

/* Variant cards: native WC fields remain the source of price/stock/cart state. */
.manifest-product-cart-form .variations :where(tbody, tr, th, td) {
	display: block;
	width: 100%;
	text-align: left;
}
.manifest-product-cart-form .variations tr + tr { margin-top: 1rem; }
.manifest-variant-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.manifest-variant-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 3rem;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: 0.875rem;
	overflow: hidden;
	background: var(--color-bg-elevated);
	color: var(--color-text);
	font-family: inherit;
	font-size: 0.875rem;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}
.manifest-variant-label { overflow-wrap: anywhere; min-width: 0; }
.manifest-variant-btn:hover:not(:disabled) { border-color: var(--color-primary); }
.manifest-variant-btn.is-active {
	border-color: var(--color-primary);
	box-shadow: inset 0 0 0 1px var(--color-primary);
	background: var(--color-bg-subtle);
	color: var(--color-primary);
	font-weight: 600;
}
.manifest-variant-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.manifest-variant-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.manifest-variant-btn:disabled .manifest-variant-label { text-decoration: line-through; }
.manifest-variant-btn:has(.manifest-variant-sale:not([hidden])) { padding-right: 2.25rem; }
.manifest-variant-image {
	width: 2.25rem;
	height: 2.25rem;
	flex: 0 0 2.25rem;
	border-radius: 0.25rem;
	object-fit: cover;
}
.manifest-variant-sale {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.3125rem 0.25rem 0;
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	background: #D82856;
	color: #FFFFFF;
	font-size: 0.875rem;
	font-weight: 800;
	line-height: 1;
	pointer-events: none;
}
.manifest-variant-btn [hidden] { display: none; }
@media (max-width: 640px) {
	.manifest-variant-row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 380px) {
	.manifest-variant-btn { gap: 0.375rem; padding-left: 0.5rem; }
	.manifest-variant-image { width: 1.75rem; height: 1.75rem; flex-basis: 1.75rem; }
}
.manifest-product-cart-form .reset_variations {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.5rem 0;
}
/* One attribute can be changed directly. Keep reset for constrained multi-attribute
   combinations; WC toggles this link with inline display styles. */
.manifest-product-cart-form .variations tr:only-child .reset_variations { display: none !important; }

/* Single source of displayed PDP price, including native WC sale/accessibility markup. */
.manifest-product-price,
.woocommerce div.product .manifest-product-price .price {
	font-family: var(--font-display, Georgia, serif);
	font-size: 1.875rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--color-text);
}
.manifest-product-price del,
.woocommerce div.product .manifest-product-price .price del {
	font-family: var(--font-body, sans-serif);
	font-size: 1rem;
	font-weight: 400;
	color: var(--color-text-tertiary, #666);
	opacity: 1;
	margin-right: 0.5rem;
}
.manifest-product-price ins,
.woocommerce div.product .manifest-product-price .price ins {
	background: transparent;
	text-decoration: none;
	color: var(--color-error, #B42318);
}
.manifest-product-price .woocommerce-price-suffix { font: 400 0.875rem var(--font-body, sans-serif); }
.manifest-product-cart-form .manifest-price-synced .woocommerce-variation-price { display: none; }

/* Archive cards: fixed title slots and bottom-aligned actions, without JS. */
.manifest-catalog-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.75rem 1rem;
}
.manifest-catalog-card { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.manifest-catalog-link { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.manifest-catalog-image { flex-shrink: 0; margin-bottom: 0.75rem; border-radius: 0.75rem; }
.manifest-catalog-category {
	min-height: 1.125rem;
	line-height: 1.125rem;
	margin: 0 0 0.375rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.manifest-catalog-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	overflow-wrap: anywhere;
	font-size: 1rem;
	line-height: 1.4;
	height: 2.8em;
	margin: 0 0 0.625rem;
}
.manifest-catalog-price-block { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0.25rem; min-width: 0; min-height: 1.875rem; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; }
.manifest-catalog-price {
	display: contents;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.5;
	color: var(--color-text, #23372A);
	white-space: nowrap;
}
.manifest-catalog-price .amount { white-space: nowrap; }
.manifest-catalog-price > .amount { flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.manifest-catalog-price del { order: 2; display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; font-weight: 400; color: var(--color-text-tertiary, #666); }
.manifest-catalog-price ins { order: 1; display: inline-flex; flex: 0 0 auto; max-width: 100%; min-width: 0; padding: 0.0625rem 0.25rem; border: 1px solid #F2BAC7; border-radius: 0.5rem; color: #D32148; background: #FFF3F6; text-decoration: none; line-height: 1.25; }
.manifest-catalog-price ins .amount { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.manifest-catalog-price .woocommerce-price-suffix { order: 3; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; font-weight: 400; }
.manifest-catalog-details { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; min-width: 0; min-height: 2.5rem; }
.manifest-catalog-promotion { width: 100%; min-width: 0; height: 1.125rem; }
.manifest-catalog-stats { display: flex; flex-wrap: nowrap; width: 100%; min-width: 0; height: 1.125rem; overflow: hidden; gap: 0.5rem; font-size: 0.75rem; line-height: 1.5; color: var(--color-text-secondary, #555); }
.manifest-catalog-rating, .manifest-catalog-sales { white-space: nowrap; }
.manifest-catalog-rating { flex: 0 0 auto; }
.manifest-catalog-sales { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.manifest-catalog-star { color: #B5720D; }
.manifest-catalog-rating + .manifest-catalog-sales::before { content: '·'; margin-right: 0.5rem; }
.manifest-catalog-card > .manifest-fe-quickview { min-height: 2.75rem; flex-shrink: 0; margin-top: 0.625rem; border-color: var(--color-primary, #2F593B); border-radius: 0.625rem; color: var(--color-primary, #2F593B); }
.manifest-catalog-card > .manifest-fe-quickview:where(:hover, :focus-visible) { color: #fff; background: var(--color-primary, #2F593B); }
.manifest-catalog-badges { position: absolute; top: 0.5rem; left: 0.5rem; right: 0.5rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.375rem; }
.manifest-catalog-label {
	max-width: 100%;
	padding: 0.3125rem 0.5rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
}
.manifest-catalog-discount { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.75rem; color: #C11D40; font-weight: 600; line-height: 1.5; }
.manifest-catalog-label { background: var(--color-primary, #2F593B); }
@media (min-width: 768px) {
	.manifest-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.5rem; }
}
@media (min-width: 1024px) {
	.manifest-catalog-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.manifest-catalog-price { font-size: 1rem; }
}
@media (max-width: 380px) {
	.manifest-catalog-title { font-size: 0.875rem; }
	.manifest-catalog-price { font-size: 0.9375rem; }
	.manifest-catalog-badges { left: 0.375rem; right: 0.375rem; }
	.manifest-catalog-label { font-size: 0.6875rem; padding: 0.25rem 0.375rem; }
}
