/* ============================================================
   Manifest Tier 1 Design System — Components
   ------------------------------------------------------------
   THE LAW (read before you edit):
   (1) Every rule consumes CSS variables from base.css. NO hex
       colors, NO px in spacing/typography, NO hardcoded fonts.
       The ONLY exceptions: external brand pills (BCA/JNE/etc)
       in the INTEGRATIONS section at the bottom — those are
       externally-locked brand colors, documented.
   (2) Use BEM-lite single-dash naming: .btn-primary, .card-product.
       State classes use .is-/.has- prefix (.is-open, .has-error).
       Prefer ARIA over state classes where semantic match exists
       ([aria-busy='true'], [aria-current='page'], [aria-expanded='true']).
   (3) Max 5 color variants + 3 size variants per component.
       Modifiers stack horizontally, never nest naming.
   (4) Components ADD specificity on top of element styling from
       base.css — a class-less <button>/<input>/<dialog> still
       renders sanely.
   (5) Touch targets min 44x44px (WCAG 2.5.5).
   (6) Every interactive element supports :focus-visible.
   (7) Every animation respects prefers-reduced-motion (handled
       globally in base.css; component-level transitions still
       use var(--transition-*) which is forced to 0ms there).
   (8) NO !important except in the INTEGRATIONS section.
   ============================================================ */


/* ============================================================
   ALERT — info / success / warning / error / dashed / soft
   Used everywhere: privacy callouts, conflict resolver, restock
   success, guarantee badge, form error banner, cek-ongkir result.
   ============================================================ */
.alert {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	padding: var(--space-md);
	border-radius: var(--radius-md);
	border: 1px solid var(--color-border);
	background: var(--color-bg-elevated);
	color: var(--color-text);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.alert-icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.125rem;
}

.alert-body { flex: 1; min-width: 0; }

.alert-title {
	font-weight: 600;
	margin-bottom: var(--space-xs);
	font-family: var(--font-body);
}

.alert-info {
	background: var(--color-primary-tint-5); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg-elevated));
	border-color: var(--color-primary-tint-20); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-primary) 20%, transparent);
	color: var(--color-text);
}
.alert-info .alert-icon { color: var(--color-primary); }

.alert-success {
	background: var(--color-success-tint-8); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-success) 8%, var(--color-bg-elevated));
	border-color: var(--color-success-tint-25); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-success) 25%, transparent);
}
.alert-success .alert-icon { color: var(--color-success); }

.alert-warning {
	background: var(--color-warning-tint-8); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-warning) 8%, var(--color-bg-elevated));
	border-color: var(--color-warning-tint-25); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-warning) 25%, transparent);
}
.alert-warning .alert-icon { color: var(--color-warning); }

.alert-error {
	background: var(--color-error-tint-6); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 6%, var(--color-bg-elevated));
	border-color: var(--color-error-tint-25); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-error) 25%, transparent);
}
.alert-error .alert-icon { color: var(--color-error); }

.alert-dashed {
	border-style: dashed;
	border-width: 2px;
	border-color: var(--color-accent-tint-40); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
	background: var(--color-accent-tint-6); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-accent) 6%, var(--color-bg-elevated));
}
.alert-dashed .alert-icon { color: var(--color-accent); }

.alert-soft {
	background: var(--color-bg-subtle);
	border-color: transparent;
}


/* ============================================================
   ANNOUNCEMENT BAR — sticky caption strip at very top
   Static (1 msg) or cycling (Alpine/vanilla helper).
   ============================================================ */
.announcement-bar {
	background: var(--color-text);
	color: var(--color-bg);
	padding: var(--space-sm) var(--space-md);
	font-size: 0.75rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	text-align: center;
	font-weight: 500;
	position: relative;
	overflow: hidden;
	min-height: 2rem;
}

.announcement-bar-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	min-height: 1.25rem;
}

.announcement-bar-track {
	position: relative;
	display: inline-block;
	min-height: 1.25rem;
}

.announcement-bar-text {
	transition: opacity var(--transition-medium) var(--ease-out);
}

.announcement-bar-text.is-leaving { opacity: 0; }

.announcement-bar-dismiss {
	position: absolute;
	right: var(--space-sm);
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	color: inherit;
	padding: var(--space-xs);
	/* P1-5 touch target sweep 2026-06-02 — WCAG 2.5.5 min 44x44. */
	min-width: 2.75rem;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
	transition: opacity var(--transition-fast) var(--ease-out);
}
.announcement-bar-dismiss:hover { opacity: 1; }

@media (max-width: 640px) {
	.announcement-bar {
		font-size: 0.6875rem;
		letter-spacing: 0.06em;
		padding: var(--space-sm) var(--space-sm);
	}
}


/* ============================================================
   ACCORDION — native <details>+<summary> based.
   FAQ page primary, also used in product tabs/specs.
   ============================================================ */
.accordion { display: flex; flex-direction: column; gap: var(--space-sm); }

.accordion-item {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-bg-elevated);
	overflow: hidden;
	transition: border-color var(--transition-fast) var(--ease-out);
}

.accordion-item:hover {
	border-color: var(--color-primary-tint-30); /* fallback for iOS Safari <16.2 — approximates mix-with-border */
	border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}

.accordion-item[open] { border-color: var(--color-primary); }

/* Hide native marker */
.accordion-trigger::-webkit-details-marker { display: none; }
.accordion-trigger::marker { content: ''; }

.accordion-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	width: 100%;
	padding: var(--space-md) var(--space-lg);
	cursor: pointer;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 1rem;
	color: var(--color-text);
	list-style: none;
	min-height: 3rem;
	user-select: none;
}

.accordion-trigger:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: -2px;
}

.accordion-icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	color: var(--color-primary);
	transition: transform var(--transition-medium) var(--ease-out);
}

[open] > .accordion-trigger .accordion-icon { transform: rotate(45deg); }

.accordion-content {
	padding: 0 var(--space-lg) var(--space-md);
	color: var(--color-text-secondary);
	line-height: 1.6;
	font-size: 0.9375rem;
}


/* ============================================================
   BADGE — small label pills. .badge-soft = tinted bg.
   ============================================================ */
.badge {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	padding: 0.25rem 0.625rem;
	border-radius: var(--radius-sm);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	white-space: nowrap;
	background: var(--color-bg-subtle);
	color: var(--color-text);
}

.badge-primary { background: var(--color-primary); color: var(--color-on-primary); }
.badge-accent  { background: var(--color-accent);  color: var(--color-text); }
.badge-success { background: var(--color-success); color: #fff; }
.badge-warning { background: var(--color-warning); color: #fff; }
.badge-error   { background: var(--color-error);   color: #fff; }

.badge-soft.badge-primary {
	background: var(--color-primary-tint-12); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-primary) 12%, transparent);
	color: var(--color-primary);
}
.badge-soft.badge-accent  {
	background: var(--color-accent-tint-18); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-accent) 18%, transparent);
	color: var(--color-accent-hover); /* fallback for iOS Safari <16.2 — darker accent reads as accent-text */
	color: color-mix(in srgb, var(--color-accent) 80%, var(--color-text));
}
.badge-soft.badge-success {
	background: var(--color-success-tint-12); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-success) 12%, transparent);
	color: var(--color-success);
}
.badge-soft.badge-warning {
	background: var(--color-warning-tint-14); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-warning) 14%, transparent);
	color: var(--color-warning);
}
.badge-soft.badge-error   {
	background: var(--color-error-tint-10); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 10%, transparent);
	color: var(--color-error);
}

/* Stock-state badges (product card overlay) */
.badge-stock-low { background: var(--color-warning); color: #fff; }
.badge-stock-out { background: var(--color-bg-subtle); color: var(--color-text-secondary); }


/* ============================================================
   BRAND-DOT — accent dot in every logo render.
   <span class="brand-dot">.</span>
   ============================================================ */
.brand-dot { color: var(--color-primary); }


/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs);
	font-size: 0.8125rem;
	color: var(--color-text-secondary);
	padding: var(--space-sm) 0;
}

.breadcrumb-item { display: inline-flex; align-items: center; gap: var(--space-xs); }

.breadcrumb-item a {
	color: var(--color-text-secondary);
	transition: color var(--transition-fast) var(--ease-out);
}
.breadcrumb-item a:hover { color: var(--color-primary); }

.breadcrumb-item + .breadcrumb-item::before {
	content: '/';
	color: var(--color-text-tertiary);
	margin-right: var(--space-xs);
}

.breadcrumb-item[aria-current='page'] {
	color: var(--color-text);
	font-weight: 500;
}


/* ============================================================
   BUTTON — .btn base + variants + sizes + states.
   Inherits from base.css <button> reset.
   Touch target ≥44px.
   ============================================================ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	padding: 0.75rem 1.5rem;
	min-height: 2.75rem; /* 44px touch target */
	border-radius: var(--radius-md);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	border: 2px solid transparent;
	background: var(--color-bg-subtle);
	color: var(--color-text);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background var(--transition-fast) var(--ease-out),
		color var(--transition-fast) var(--ease-out),
		border-color var(--transition-fast) var(--ease-out),
		transform var(--transition-medium) var(--ease-out),
		box-shadow var(--transition-medium) var(--ease-out);
	position: relative;
	-webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled='true'] {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

/* Variants */
.btn-primary {
	background: var(--color-primary);
	color: var(--color-on-primary);
	border-color: var(--color-primary);
}
.btn-primary:hover {
	background: var(--color-primary-hover);
	border-color: var(--color-primary-hover);
	color: var(--color-on-primary);
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -8px var(--color-primary-tint-35); /* fallback for iOS Safari <16.2 */
	box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

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

.btn-outline {
	background: transparent;
	color: var(--color-primary);
	border-color: var(--color-primary);
}
.btn-outline:hover {
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.btn-ghost {
	background: transparent;
	color: var(--color-text);
	border-color: transparent;
}
.btn-ghost:hover {
	background: var(--color-bg-subtle);
	color: var(--color-primary);
}

.btn-danger {
	background: var(--color-error);
	color: #fff;
	border-color: var(--color-error);
}
.btn-danger:hover {
	background: var(--color-error-dark-85); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 85%, #000);
	border-color: var(--color-error-dark-85); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-error) 85%, #000);
	color: #fff;
}

/* Sizes */
.btn-sm {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	min-height: 2.5rem; /* 40px — used for inline secondary actions, NOT primary CTAs */
}

.btn-lg {
	padding: 1rem 2rem;
	font-size: 1.0625rem;
	min-height: 3.25rem;
}

.btn-block {
	display: flex;
	width: 100%;
}

/* Icon-only round button */
.btn-icon-only {
	padding: 0;
	width: 2.75rem;
	height: 2.75rem;
	min-height: 2.75rem;
	border-radius: var(--radius-full);
	flex-shrink: 0;
}
.btn-icon-only.btn-sm { width: 2.5rem; height: 2.5rem; min-height: 2.5rem; }
.btn-icon-only.btn-lg { width: 3.25rem; height: 3.25rem; min-height: 3.25rem; }

/* Loading state — works with .is-loading OR [aria-busy='true'] */
.btn.is-loading,
.btn[aria-busy='true'] {
	color: transparent !important; /* allowed: state-class override */
	pointer-events: none;
	position: relative;
}

.btn.is-loading::after,
.btn[aria-busy='true']::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.125rem;
	height: 1.125rem;
	margin: -0.5625rem 0 0 -0.5625rem;
	border: 2px solid currentColor;
	border-color: rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: var(--radius-full);
	color: #fff;
	animation: mfst-spin 0.7s linear infinite;
}

.btn-ghost.is-loading::after,
.btn-outline.is-loading::after,
.btn-secondary.is-loading::after,
.btn-ghost[aria-busy='true']::after,
.btn-outline[aria-busy='true']::after,
.btn-secondary[aria-busy='true']::after {
	border-color: var(--color-text-tint-25); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-text) 25%, transparent);
	border-top-color: var(--color-text);
}

@keyframes mfst-spin { to { transform: rotate(360deg); } }


/* ============================================================
   CARD — base container + variants.
   ============================================================ */
.card {
	background: var(--color-bg-elevated);
	border-radius: var(--radius-md);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	transition: transform var(--transition-medium) var(--ease-out),
	            box-shadow var(--transition-medium) var(--ease-out),
	            border-color var(--transition-fast) var(--ease-out);
}

.card-header { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-border); }
.card-body   { padding: var(--space-lg); }
.card-footer { padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--color-border); background: var(--color-bg-subtle); }

.card.is-featured {
	border-color: var(--color-primary);
	box-shadow: var(--shadow-md);
}

.card.is-soldout { opacity: 0.7; }

.card-soft     { background: var(--color-bg-subtle); border-color: transparent; box-shadow: none; }
.card-bordered { box-shadow: none; }
.card-dashed   {
	border-style: dashed;
	border-width: 2px;
	border-color: var(--color-accent-tint-40); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
}

.card-lift:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}


/* ============================================================
   CHECKOUT STEPPER — 3-step progress indicator
   ============================================================ */
.checkout-stepper {
	list-style: none !important;
	margin: 0;
	padding-left: 0 !important;
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	padding: var(--space-md) 0;
}

.checkout-stepper-step {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.checkout-stepper-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	min-width: 2.25rem;
	border-radius: var(--radius-full);
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 600;
	background: var(--color-bg-elevated);
	color: var(--color-text-tertiary);
	border: 2px solid var(--color-border);
	transition: background var(--transition-fast) var(--ease-out),
	            color var(--transition-fast) var(--ease-out),
	            border-color var(--transition-fast) var(--ease-out);
}

.checkout-stepper-indicator.is-active {
	background: var(--color-primary);
	color: var(--color-on-primary);
	border-color: var(--color-primary);
}

.checkout-stepper-indicator.is-done {
	background: var(--color-primary);
	color: var(--color-on-primary);
	border-color: var(--color-primary);
}

.checkout-stepper-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text-secondary);
}

.checkout-stepper-step.is-active .checkout-stepper-label,
.checkout-stepper-step.is-done   .checkout-stepper-label {
	color: var(--color-text);
}

.checkout-stepper-line {
	flex: 1;
	height: 2px;
	background: var(--color-border);
	transition: background var(--transition-fast) var(--ease-out);
}
.checkout-stepper-line.is-done { background: var(--color-primary); }

@media (max-width: 640px) {
	.checkout-stepper-label { display: none; }
	.checkout-stepper-step.is-active .checkout-stepper-label { display: inline; }
}


/* ============================================================
   DRAWER — slide-in panels (mobile nav, cart, filter)
   ============================================================ */
.drawer-overlay {
	position: fixed;
	inset: 0;
	background: var(--color-text-tint-30); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-text) 30%, transparent);
	z-index: var(--z-drawer-overlay);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--transition-medium) var(--ease-out);
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 18rem;
	max-width: 90vw;
	background: var(--color-bg-elevated);
	box-shadow: var(--shadow-lg);
	z-index: var(--z-drawer);
	display: flex;
	flex-direction: column;
	transition: transform var(--transition-medium) var(--ease-out);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.drawer-left  { left: 0;  transform: translateX(-100%); }
.drawer-right { right: 0; transform: translateX(100%);  }

.drawer.is-open { transform: translateX(0); }

.drawer-header {
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--color-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	flex-shrink: 0;
}

.drawer-body {
	padding: var(--space-md) var(--space-lg);
	flex: 1;
	overflow-y: auto;
}

.drawer-footer {
	padding: var(--space-md) var(--space-lg);
	border-top: 1px solid var(--color-border);
	background: var(--color-bg-subtle);
	flex-shrink: 0;
}

.drawer-close {
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-full);
	color: var(--color-text);
	background: transparent;
	transition: background var(--transition-fast) var(--ease-out);
}
.drawer-close:hover { background: var(--color-bg-subtle); }


/* ============================================================
   DROPDOWN — header nav child menus, etc.
   ============================================================ */
.dropdown { position: relative; display: inline-block; }

.dropdown-trigger {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	background: transparent;
	color: var(--color-text);
	padding: var(--space-sm);
	font: inherit;
	cursor: pointer;
}

.dropdown-chevron {
	width: 0.875rem;
	height: 0.875rem;
	transition: transform var(--transition-fast) var(--ease-out);
}
.dropdown.is-open .dropdown-chevron,
.dropdown-trigger[aria-expanded='true'] .dropdown-chevron { transform: rotate(180deg); }

.dropdown-menu {
	position: absolute;
	top: 100%; /* sits flush against trigger bottom — NO margin-top gap */
	left: 0;
	min-width: 14rem;
	/* Live-WP visual parity 2026-06-05: symmetric padding + Tailwind-style softer shadow. */
	padding: 0.5rem 0;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: 0.375rem; /* rounded-md (Tailwind) */
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg (Tailwind) */
	display: none;
	opacity: 0;
	transform: scale(0.97);
	transform-origin: top left;
	pointer-events: none;
	z-index: var(--z-dropdown);
	transition: opacity var(--transition-fast) var(--ease-out),
	            transform var(--transition-fast) var(--ease-out);
}
.dropdown.is-open .dropdown-menu,
.dropdown-trigger[aria-expanded='true'] + .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
	display: block;
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}

.dropdown-item {
	display: block;
	padding: 0.5rem 1rem;     /* Tailwind py-2 px-4 — exact live-WP parity */
	color: var(--color-text);
	font-size: 0.875rem;       /* Tailwind text-sm */
	line-height: 1.25rem;      /* 20px — Tailwind text-sm line-height */
	cursor: pointer;
	transition: background 150ms ease-out, color 150ms ease-out;
}
.dropdown-item:hover {
	background: var(--color-bg-subtle);
	color: var(--color-primary);
}


/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
	text-align: center;
	padding: var(--space-2xl) var(--space-md);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-md);
}

.empty-state-icon {
	width: 5rem;
	height: 5rem;
	border-radius: var(--radius-full);
	background: var(--color-bg-subtle);
	color: var(--color-text-secondary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--space-sm);
}
.empty-state-icon svg { width: 2rem; height: 2rem; }

.empty-state-title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--color-text);
}

.empty-state-desc {
	color: var(--color-text-secondary);
	max-width: 32rem;
	margin: 0 auto;
}

.empty-state-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	justify-content: center;
	margin-top: var(--space-sm);
}


/* ============================================================
   FORM FIELD — field wrapper + label + control + hint + error.
   Inherits raw element styling from base.css.
   ============================================================ */
.form-field,
.field {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	margin-bottom: var(--space-md);
}

.form-label,
.field-label {
	font-size: 0.75rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-text);
}

.field-required::after {
	content: ' *';
	color: var(--color-error);
}

.form-help,
.field-hint {
	font-size: 0.8125rem;
	color: var(--color-text-tertiary);
	line-height: 1.5;
}

.form-error,
.field-error {
	font-size: 0.8125rem;
	color: var(--color-error);
	display: none;
	align-items: center;
	gap: var(--space-xs);
	font-weight: 500;
}

.form-field.has-error .form-error,
.field.has-error .field-error,
.form.show-errors :invalid + .form-error,
.form.show-errors :invalid ~ .form-error { display: flex; }

/* Inputs */
.form-input,
.input,
.select,
.textarea {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	min-height: 2.75rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: var(--color-bg-elevated);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color var(--transition-fast) var(--ease-out),
	            box-shadow var(--transition-fast) var(--ease-out),
	            background var(--transition-fast) var(--ease-out);
}

.form-input:focus,
.input:focus,
.select:focus,
.textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-tint-18); /* fallback for iOS Safari <16.2 */
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.form-input::placeholder,
.input::placeholder,
.textarea::placeholder { color: var(--color-text-tertiary); }

.form-input:disabled,
.input:disabled,
.select:disabled,
.textarea:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background: var(--color-bg-subtle);
}

.form-field.has-error .form-input,
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea,
.form.show-errors :invalid {
	border-color: var(--color-error);
	background: var(--color-error-tint-4); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 4%, var(--color-bg-elevated));
}
.form-field.has-error .form-input:focus,
.field.has-error .input:focus,
.field.has-error .select:focus,
.field.has-error .textarea:focus {
	box-shadow: 0 0 0 3px var(--color-error-tint-18); /* fallback for iOS Safari <16.2 */
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 18%, transparent);
}

/* Select — custom chevron */
.select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.125rem 1.125rem;
	padding-right: 2.5rem;
}

/* Textarea */
.textarea { min-height: 6rem; resize: vertical; }
.textarea-no-resize { resize: none; }

/* Input with icon adornment */
.input-group { position: relative; }

.input-icon-left,
.input-icon-right {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: var(--color-text-tertiary);
	pointer-events: none;
	width: 1.25rem;
	height: 1.25rem;
}
.input-icon-left  { left: 0.875rem; }
.input-icon-right { right: 0.875rem; }

.input-group .input.has-icon-left  { padding-left: 2.625rem; }
.input-group .input.has-icon-right { padding-right: 2.625rem; }

/* Loading spinner inside select (cascading dropdown) */
.select.is-loading {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230F766E' stroke-width='2'><circle cx='12' cy='12' r='9' stroke-opacity='0.25'/><path d='M21 12a9 9 0 0 0-9-9' stroke-linecap='round'/></svg>");
	animation: mfst-select-spin 0.8s linear infinite;
}
@keyframes mfst-select-spin {
	to { background-position: right 0.75rem center; transform: none; }
}

/* Checkbox + Radio — use native with accent-color fallback */
.form-checkbox,
.form-radio,
.checkbox,
.radio {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	cursor: pointer;
	font-size: 0.9375rem;
	color: var(--color-text);
	user-select: none;
	min-height: 1.5rem;
}

.form-checkbox input[type='checkbox'],
.form-radio input[type='radio'],
.checkbox input[type='checkbox'],
.radio input[type='radio'] {
	width: 1.125rem;
	height: 1.125rem;
	accent-color: var(--color-primary);
	cursor: pointer;
	flex-shrink: 0;
}

/* Radio-card pattern — label as full card */
.radio-card {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	padding: var(--space-md);
	border: 2px solid var(--color-border);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: border-color var(--transition-fast) var(--ease-out),
	            background var(--transition-fast) var(--ease-out);
}
.radio-card:hover {
	border-color: var(--color-primary-tint-40); /* fallback for iOS Safari <16.2 */
	border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
}
.radio-card:has(input:checked) {
	border-color: var(--color-primary);
	background: var(--color-primary-tint-5); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg-elevated));
}

/* Switch toggle */
.switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	cursor: pointer;
	user-select: none;
}

.switch input[type='checkbox'] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.switch-track {
	width: 2.5rem;
	height: 1.5rem;
	background: var(--color-border);
	border-radius: var(--radius-full);
	position: relative;
	transition: background var(--transition-fast) var(--ease-out);
	flex-shrink: 0;
}

.switch-track::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 1.25rem;
	height: 1.25rem;
	background: #fff;
	border-radius: var(--radius-full);
	transition: transform var(--transition-fast) var(--ease-out);
	box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.switch input:checked + .switch-track { background: var(--color-primary); }
.switch input:checked + .switch-track::after { transform: translateX(1rem); }

.switch input:focus-visible + .switch-track {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* Form-level error banner (top-of-form) */
.error-banner {
	display: none;
	align-items: flex-start;
	gap: var(--space-sm);
	padding: var(--space-md);
	border-radius: var(--radius-md);
	background: var(--color-error-tint-6); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 6%, var(--color-bg-elevated));
	border: 1px solid var(--color-error-tint-30); /* fallback for iOS Safari <16.2 */
	border: 1px solid color-mix(in srgb, var(--color-error) 30%, transparent);
	color: var(--color-text);
	font-size: 0.9375rem;
	margin-bottom: var(--space-md);
}
.error-banner-icon { color: var(--color-error); flex-shrink: 0; width: 1.25rem; height: 1.25rem; }
.form.show-errors .error-banner { display: flex; }

@keyframes mfst-error-shake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-4px); }
	40%, 80% { transform: translateX(4px); }
}
.form.show-errors :invalid:focus { animation: mfst-error-shake 0.4s var(--ease-out); }


/* ============================================================
   GALLERY — product image gallery + thumbnails
   Lightbox = uses .modal-lightbox variant.
   ============================================================ */
.gallery { display: flex; flex-direction: column; gap: var(--space-md); }

.gallery-main {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	overflow: hidden;
	cursor: zoom-in;
	display: block;
	width: 100%;
	padding: 0;
}
.gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-sm);
}

.gallery-thumb {
	aspect-ratio: 1 / 1;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-sm);
	overflow: hidden;
	border: 2px solid transparent;
	cursor: pointer;
	padding: 0;
	transition: border-color var(--transition-fast) var(--ease-out);
}
.gallery-thumb img {
	width: 100%; height: 100%; object-fit: cover;
}
.gallery-thumb.is-active { border-color: var(--color-primary); }
.gallery-thumb:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}


/* ============================================================
   GUARANTEE CARD — dashed accent border alert
   ============================================================ */
.guarantee-card {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	padding: var(--space-sm) var(--space-md);
	border: 2px dashed var(--color-accent-tint-40); /* fallback for iOS Safari <16.2 */
	border: 2px dashed color-mix(in srgb, var(--color-accent) 40%, transparent);
	background: var(--color-accent-tint-5); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-accent) 5%, var(--color-bg-elevated));
	border-radius: var(--radius-md);
	font-size: 0.9375rem;
	color: var(--color-text);
}
.guarantee-card-icon { color: var(--color-accent); flex-shrink: 0; width: 1.25rem; height: 1.25rem; }


/* ============================================================
   HERO — page hero variants
   ============================================================ */
.hero {
	position: relative;
	padding: var(--space-2xl) 0;
	overflow: hidden;
}

.hero-warm {
	background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-mix-80) 100%); /* fallback for iOS Safari <16.2 */
	background: linear-gradient(135deg, var(--color-bg) 0%, color-mix(in srgb, var(--color-bg) 80%, var(--color-bg-subtle)) 100%);
}

.hero-warm::after {
	content: '';
	position: absolute;
	inset: 0;
	/* fallback for iOS Safari <16.2 */
	background:
		radial-gradient(at 80% 20%, var(--color-primary-tint-8), transparent 50%),
		radial-gradient(at 20% 80%, var(--color-accent-tint-12), transparent 50%);
	background:
		radial-gradient(at 80% 20%, color-mix(in srgb, var(--color-primary) 8%, transparent), transparent 50%),
		radial-gradient(at 20% 80%, color-mix(in srgb, var(--color-accent) 12%, transparent), transparent 50%);
	pointer-events: none;
}

.hero-inner {
	position: relative;
	z-index: 1;
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

.hero-split-50 {
	display: grid;
	gap: var(--space-2xl);
	align-items: center;
	grid-template-columns: 1fr;
}
@media (min-width: 768px) {
	.hero-split-50 { grid-template-columns: 1fr 1fr; }
}

.hero-eyebrow {
	font-size: 0.75rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	font-weight: 500;
	color: var(--color-primary);
	margin-bottom: var(--space-md);
	display: inline-block;
}

.hero-title {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: var(--letter-spacing-display);
	line-height: var(--line-height-tight);
	color: var(--color-text);
	font-size: clamp(2.25rem, 4vw + 1rem, 4.5rem);
	margin-bottom: var(--space-md);
	text-wrap: balance;
}

.hero-subtitle {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--color-text-secondary);
	max-width: 32rem;
	margin-bottom: var(--space-lg);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	margin-bottom: var(--space-lg);
}

.hero-media {
	aspect-ratio: 4 / 5;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	overflow: hidden;
	position: relative;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-decor-number {
	position: absolute;
	right: -1rem;
	bottom: -2rem;
	font-family: var(--font-display);
	font-size: clamp(8rem, 18vw, 15rem);
	font-weight: 700;
	line-height: 1;
	color: var(--color-primary-tint-12); /* fallback for iOS Safari <16.2 */
	color: color-mix(in srgb, var(--color-primary) 12%, transparent);
	pointer-events: none;
	user-select: none;
}

.hero-full-bleed-overlay {
	position: relative;
	min-height: 28rem;
	background: var(--color-bg-subtle);
	color: var(--color-text);
	display: flex;
	align-items: center;
	overflow: hidden;
}
.hero-full-bleed-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	/* fallback for iOS Safari <16.2 */
	background: linear-gradient(
		180deg,
		var(--color-text-tint-10) 0%,
		var(--color-text-tint-40) 100%
	);
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--color-text) 10%, transparent) 0%,
		color-mix(in srgb, var(--color-text) 40%, transparent) 100%
	);
	pointer-events: none;
	z-index: 1;
}
.hero-full-bleed-overlay > .hero-inner { z-index: 2; }

.hero-collage {
	display: grid;
	gap: var(--space-md);
	grid-template-columns: repeat(2, 1fr);
	align-items: stretch;
}
@media (min-width: 768px) {
	.hero-collage { grid-template-columns: 2fr 1fr 1fr; }
}


/* ============================================================
   HORIZONTAL SCROLL — snap row for recently-viewed, etc.
   ============================================================ */
.horizontal-scroll {
	display: flex;
	justify-content: safe center; /* underfilled row -> centered; overflow -> start (scroll) */
	gap: var(--space-md);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: var(--space-sm);
	scrollbar-width: thin;
}
.container:has(> .horizontal-scroll) > h2 { text-align: center; } /* recently-viewed: heading centered to match centered cards (no floating heading) */
.horizontal-scroll > * {
	flex-shrink: 0;
	scroll-snap-align: start;
}
.horizontal-scroll::-webkit-scrollbar { height: 4px; }
.horizontal-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }


/* ============================================================
   INFO LIST — icon + title + desc rows (shipping/payment promises)
   ============================================================ */
.info-list {
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.info-list-item {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
}

.info-list-icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	color: var(--color-primary);
	margin-top: 0.125rem;
}

.info-list-title {
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--color-text);
	margin-bottom: 0.125rem;
}

.info-list-desc {
	color: var(--color-text-secondary);
	font-size: 0.8125rem;
	line-height: 1.5;
}


/* ============================================================
   MODAL — built on native <dialog>. Variants: default / lightbox.
   ============================================================ */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: var(--color-text-tint-35); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-text) 35%, transparent);
	z-index: var(--z-modal-overlay);
	display: none;
	align-items: center;
	justify-content: center;
	padding: var(--space-md);
}
.modal-overlay.is-open { display: flex; }

.modal {
	background: var(--color-bg-elevated);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	max-width: 32rem;
	width: 100%;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 0;
	padding: 0;
	position: relative;
	z-index: var(--z-modal);
}

/* Native <dialog> integration */
dialog.modal[open] {
	display: flex;
}
dialog.modal::backdrop {
	background: var(--color-black-tint-50); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, #000 50%, transparent);
}

.modal-header {
	padding: var(--space-md) var(--space-lg);
	border-bottom: 1px solid var(--color-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	flex-shrink: 0;
}

.modal-title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-text);
	margin: 0;
}

.modal-body {
	padding: var(--space-lg);
	overflow-y: auto;
	flex: 1;
}

.modal-footer {
	padding: var(--space-md) var(--space-lg);
	border-top: 1px solid var(--color-border);
	background: var(--color-bg-subtle);
	display: flex;
	justify-content: flex-end;
	gap: var(--space-sm);
	flex-shrink: 0;
}

.modal-close {
	/* P1-5 touch target sweep 2026-06-02 — WCAG 2.5.5 min 44x44. */
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--color-text-secondary);
	transition: background var(--transition-fast) var(--ease-out),
	            color var(--transition-fast) var(--ease-out);
}
.modal-close:hover { background: var(--color-bg-subtle); color: var(--color-text); }

.modal-md { max-width: 36rem; }
.modal-lg { max-width: 48rem; }

/* Lightbox variant — full-viewport image */
.modal-lightbox {
	max-width: 96vw;
	max-height: 96vh;
	background: var(--color-text-dark-95); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-text) 95%, #000);
	color: #fff;
	border-radius: var(--radius-md);
}
.modal-lightbox .modal-body { padding: 0; display: flex; align-items: center; justify-content: center; }
.modal-lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }

.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--radius-full);
	background: rgba(255,255,255,0.15);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background var(--transition-fast) var(--ease-out);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav-prev { left: var(--space-md); }
.lightbox-nav-next { right: var(--space-md); }

.lightbox-dots {
	position: absolute;
	bottom: var(--space-md);
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: var(--space-xs);
}
/* P1-5 touch target sweep 2026-06-02 — WCAG 2.5.5 min 44x44 hit area
   with the 0.5rem visual dot rendered via ::before pseudo (perceived size unchanged). */
.lightbox-dot {
	position: relative;
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	background: transparent;
	transition: background var(--transition-fast) var(--ease-out);
	padding: 0;
	border: 0;
	cursor: pointer;
}
.lightbox-dot::before {
	content: '';
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--radius-full);
	background: rgba(255,255,255,0.4);
	transition: background var(--transition-fast) var(--ease-out),
	            width var(--transition-fast) var(--ease-out);
}
.lightbox-dot[aria-current='true']::before { background: #fff; width: 1.5rem; border-radius: var(--radius-full); }


/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--space-xs);
	padding: var(--space-md) 0;
}

.pagination-btn {
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 var(--space-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-md);
	border: 1px solid var(--color-border);
	background: var(--color-bg-elevated);
	color: var(--color-text);
	font-weight: 500;
	font-size: 0.9375rem;
	transition: background var(--transition-fast) var(--ease-out),
	            color var(--transition-fast) var(--ease-out),
	            border-color var(--transition-fast) var(--ease-out);
}
.pagination-btn:hover { border-color: var(--color-text); }
.pagination-btn:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}
.pagination-btn.is-active,
.pagination-btn[aria-current='page'] {
	background: var(--color-text);
	color: var(--color-bg);
	border-color: var(--color-text);
}
.pagination-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.pagination-ellipsis {
	min-width: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text-tertiary);
	cursor: default;
}


/* ============================================================
   PRICE — current + strikethrough + discount badge.
   Also supports cart free-ongkir strike pattern.
   ============================================================ */
.price {
	display: inline-flex;
	align-items: baseline;
	gap: var(--space-sm);
	flex-wrap: wrap;
}

.price-current {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-primary);
	letter-spacing: -0.01em;
}

.price-strikethrough,
.price-old {
	text-decoration: line-through;
	color: var(--color-text-tertiary);
	font-size: 0.9375rem;
}

.price-discount,
.price-discount-pct {
	display: inline-flex;
	align-items: center;
	padding: 0.125rem 0.5rem;
	background: var(--color-accent);
	color: var(--color-text);
	border-radius: var(--radius-sm);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.price-sm .price-current { font-size: 1.125rem; }
.price-lg .price-current { font-size: 2rem; }

/* Free-ongkir / shipping subsidy strike */
.price-shipping {
	display: inline-flex;
	align-items: baseline;
	gap: var(--space-xs);
}
.price-shipping .price-strike-label {
	text-decoration: line-through;
	color: var(--color-text-tertiary);
	font-size: 0.875rem;
}
.price-shipping .price-replacement {
	color: var(--color-success);
	font-weight: 600;
	font-size: 0.9375rem;
}


/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	background: transparent;
	border-radius: var(--radius-md);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform var(--transition-medium) var(--ease-out);
}

.product-card-media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.product-card-1x1 .product-card-media { aspect-ratio: 1 / 1; }
.product-card-3x4 .product-card-media { aspect-ratio: 3 / 4; }
.product-card-4x3 .product-card-media { aspect-ratio: 4 / 3; }

.product-card-img,
.product-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow) var(--ease-out);
}

.product-card:hover .product-card-img,
.product-card:hover .product-card-media img {
	transform: scale(1.05);
}

.product-card-overlay {
	position: absolute;
	top: var(--space-sm);
	left: var(--space-sm);
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	z-index: 1;
}

.product-card-overlay-badge {
	background: var(--color-bg-elevated-tint-95); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-bg-elevated) 95%, transparent);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--color-text);
	padding: 0.25rem 0.625rem;
	font-size: 0.6875rem;
	font-weight: 600;
	border-radius: var(--radius-sm);
	letter-spacing: 0.04em;
}

.product-card-body {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	padding: var(--space-xs) 0;
}

.product-card-category {
	font-size: 0.6875rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	color: var(--color-text-tertiary);
	font-weight: 500;
}

.product-card-title {
	font-family: var(--font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--color-text);
	line-height: 1.3;
	transition: color var(--transition-fast) var(--ease-out);
}
.product-grid .product-card-title { min-height: 2.6em; } /* reserve 2 lines so 1- vs 2-line titles keep prices aligned */
.product-card:hover .product-card-title { color: var(--color-primary); }

.product-card-actions {
	margin-top: var(--space-xs);
	display: flex;
	gap: var(--space-xs);
}

.product-card:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 4px;
	border-radius: var(--radius-md);
}


/* ============================================================
   PRODUCT GRID — responsive auto-fill
   ============================================================ */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--space-md);
}
@media (min-width: 768px) {
	.product-grid { gap: var(--space-lg); }
}
.product-grid-2up { grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); }
.product-grid-3up { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.product-grid-4up { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }


/* ============================================================
   PRODUCT DETAIL — page layout primitive
   ============================================================ */
.product-detail {
	display: grid;
	gap: var(--space-2xl);
	grid-template-columns: 1fr;
	align-items: start;
}
@media (min-width: 1024px) {
	.product-detail { grid-template-columns: 1.1fr 1fr; }
}

.product-detail-info > * + * { margin-top: var(--space-md); }


/* ============================================================
   QTY INPUT — quantity stepper with +/- buttons.
   Touch targets ≥44px.
   ============================================================ */
.qty-input,
.qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 2px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--color-bg-elevated);
}

.qty-input-btn,
.qty-stepper-btn {
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--color-text);
	font-size: 1.125rem;
	font-weight: 500;
	cursor: pointer;
	transition: background var(--transition-fast) var(--ease-out);
}
.qty-input-btn:hover,
.qty-stepper-btn:hover { background: var(--color-bg-subtle); }
.qty-input-btn:disabled,
.qty-stepper-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}
.qty-input-btn:focus-visible,
.qty-stepper-btn:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: -2px;
}

.qty-input-field,
.qty-stepper-input {
	width: 3.5rem;
	height: 2.75rem;
	background: transparent;
	border: 0;
	border-left: 1px solid var(--color-border);
	border-right: 1px solid var(--color-border);
	text-align: center;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 500;
	color: var(--color-text);
	padding: 0;
	-moz-appearance: textfield;
}
.qty-input-field::-webkit-inner-spin-button,
.qty-input-field::-webkit-outer-spin-button,
.qty-stepper-input::-webkit-inner-spin-button,
.qty-stepper-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.qty-input-field:focus,
.qty-stepper-input:focus { outline: none; background: var(--color-bg-subtle); }


/* ============================================================
   SITE HEADER — sticky + backdrop-blur + scroll state
   ============================================================ */
/* x-data wrapper around header+drawer must NOT create a stacking/sticky
   container with constrained height (Firefox strict). display:contents
   removes the wrapper's box so sticky context = body (full page scroll).
   2026-06-05 fix for "sticky header doesn't stick" Firefox bug. */
body > div[x-data]:has(> header.site-header) {
	display: contents;
}

.site-header,
.header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	background: var(--color-bg-mix-85); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-bg) 85%, transparent);
	border-bottom: 1px solid var(--color-border);
	transition: background var(--transition-fast) var(--ease-out),
	            box-shadow var(--transition-fast) var(--ease-out);
}

@supports (backdrop-filter: blur(12px)) {
	.site-header,
	.header {
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
	}
}

@supports not (backdrop-filter: blur(12px)) {
	.site-header,
	.header { background: var(--color-bg); }
}

.site-header.is-scrolled,
.header.is-scrolled {
	background: var(--color-bg);
	box-shadow: var(--shadow-sm);
}

.site-header-inner,
.header-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--container-padding);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	height: var(--header-height);
}

.site-logo,
.header-logo {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: var(--letter-spacing-display);
	color: var(--color-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60vw;
}

@media (max-width: 640px) {
	.site-logo, .header-logo { font-size: 1.125rem; max-width: 55vw; }
}

/* Primary nav (desktop) */
.nav-primary {
	display: none;
	align-items: center;
	gap: var(--space-lg);
	font-size: 0.875rem;
	font-weight: 500;
}
@media (min-width: 768px) {
	.nav-primary { display: flex; }
}

.nav-primary > a,
.site-nav-link {
	color: var(--color-text);
	transition: color var(--transition-fast) var(--ease-out);
	padding: var(--space-xs) 0;
	position: relative;
}
/* Bug fix 2026-06-05: was `.nav-primary a` (descendant) which matched
   .dropdown-item inside .dropdown-menu inside .nav-primary, overriding
   .dropdown-item padding via specificity 0,1,1 > 0,1,0. Tightened to
   direct-child `>` so dropdown items keep their own padding. Trigger
   `.dropdown-trigger.site-nav-link` still matched via .site-nav-link class. */
.nav-primary a:hover,
.nav-primary a[aria-current='page'],
.site-nav-link:hover,
.site-nav-link[aria-current='page'],
.site-nav-link.is-active { color: var(--color-primary); }

.site-nav-link[aria-current='page']::after,
.site-nav-link.is-active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background: var(--color-primary);
}

/* Header right icons */
.header-icons {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}
.header-icon-btn {
	/* Live-WP parity 2026-06-05: padding-based click area, square not pill. */
	padding: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--color-text);
	border-radius: var(--radius-sm);
	position: relative;
	transition: background var(--transition-fast) var(--ease-out);
}
.header-icon-btn:hover { background: var(--color-bg-subtle); }

.cart-badge {
	position: absolute;
	top: 0.375rem;
	right: 0.375rem;
	background: var(--color-accent); /* gold #D4A75A */
	color: var(--color-text);        /* near-black #1A1A1A — 7.85:1 AAA on gold (was #fff = 2.22:1 FAIL) */
	font-size: 0.625rem;
	font-weight: 700;
	border-radius: var(--radius-full);
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 0.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* Mobile drawer trigger */
.nav-mobile-trigger {
	display: inline-flex;
}
@media (min-width: 768px) {
	.nav-mobile-trigger { display: none; }
}

/* Mobile drawer is just .drawer-left — alias here */
.nav-mobile-drawer { /* see .drawer-left */ }


/* ============================================================
   SITE FOOTER — 4-col grid + payment + courier strips
   ============================================================ */
.site-footer,
.footer {
	background: var(--color-bg-subtle);
	padding: var(--space-3xl) 0 var(--space-xl);  /* 64/32 — live-WP parity 2026-06-05 */
	border-top: 1px solid var(--color-border);
	margin-top: var(--space-3xl);                  /* 64 — live-WP parity */
	color: var(--color-text);                       /* darker text — live-WP parity */
	font-size: 0.875rem;
}

.site-footer-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

.site-footer-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-xl);
	margin-bottom: var(--space-xl);
}
@media (min-width: 768px) {
	.site-footer-grid { grid-template-columns: repeat(4, 1fr); }
}

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

.site-footer h4,
.site-footer-heading {
	font-family: var(--font-body);
	font-size: 0.75rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: var(--space-md);
}

.site-footer ul { display: flex; flex-direction: column; gap: var(--space-sm); }
.site-footer li a {
	color: var(--color-text-secondary);
	transition: color var(--transition-fast) var(--ease-out);
}
.site-footer li a:hover { color: var(--color-primary); }

.site-footer-bottom {
	padding-top: var(--space-lg);
	border-top: 1px solid var(--color-border);
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	align-items: center;
	font-size: 0.75rem;
	color: var(--color-text-tertiary);
}
@media (min-width: 768px) {
	.site-footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* Payment + courier pill strips */
.payment-strip,
.courier-strip,
.payment-badges,
.courier-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	align-items: center;
}

.pill {
	display: inline-block;
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	padding: 0.25rem 0.5rem;
	border-radius: 2px;
	color: #fff;
	background: var(--color-text-secondary);
}

/* Social icons */
.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: var(--radius-full);
	background: var(--color-text);
	color: var(--color-bg);
	transition: background var(--transition-fast) var(--ease-out),
	            transform var(--transition-medium) var(--ease-out);
}
.social-icon:hover {
	background: var(--color-primary);
	color: var(--color-on-primary);
	transform: translateY(-2px);
}


/* ============================================================
   SKELETON — loading placeholder
   ============================================================ */
.skeleton {
	display: block;
	/* fallback for iOS Safari <16.2 */
	background: linear-gradient(
		90deg,
		var(--color-bg-subtle) 0%,
		var(--color-bg-subtle-mix-70) 50%,
		var(--color-bg-subtle) 100%
	);
	background: linear-gradient(
		90deg,
		var(--color-bg-subtle) 0%,
		color-mix(in srgb, var(--color-bg-subtle) 70%, var(--color-bg-elevated)) 50%,
		var(--color-bg-subtle) 100%
	);
	background-size: 200% 100%;
	animation: mfst-skeleton 1.4s ease-in-out infinite;
	border-radius: var(--radius-sm);
	min-height: 0.875rem;
}

@keyframes mfst-skeleton {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.skeleton-text { height: 0.875rem; margin-bottom: var(--space-xs); }
.skeleton-text-lg { height: 1.5rem; }
.skeleton-image { aspect-ratio: 1 / 1; height: auto; border-radius: var(--radius-md); }
.skeleton-card {
	height: 20rem;
	border-radius: var(--radius-md);
}


/* ============================================================
   SPEC LIST — label/value rows for product attributes
   ============================================================ */
.spec-list { display: flex; flex-direction: column; }

.spec-list-row {
	display: flex;
	justify-content: space-between;
	gap: var(--space-md);
	padding: var(--space-sm) 0;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.9375rem;
}
.spec-list-row:last-child { border-bottom: 0; }

.spec-list-label { color: var(--color-text-secondary); }
.spec-list-value { color: var(--color-text); font-weight: 500; text-align: right; }


/* ============================================================
   SPINNER — inline loading indicator
   ============================================================ */
.spinner {
	display: inline-block;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid var(--color-currentcolor-tint-25); /* fallback for iOS Safari <16.2 — neutral-text tint */
	border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
	border-top-color: currentColor;
	border-radius: var(--radius-full);
	animation: mfst-spin 0.7s linear infinite;
}
.spinner-sm { width: 0.875rem; height: 0.875rem; border-width: 2px; }
.spinner-lg { width: 1.75rem; height: 1.75rem; border-width: 3px; }


/* ============================================================
   STATUS PILL — order status badges (track page, order list)
   Distinct from .badge — used for state, not labels.
   ============================================================ */
.status-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	padding: 0.375rem 0.75rem;
	border-radius: var(--radius-full);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	background: var(--color-bg-subtle);
	color: var(--color-text-secondary);
}
.status-pill-active  { background: var(--color-primary); color: var(--color-on-primary); }
.status-pill-done    { background: var(--color-success); color: #fff; }
.status-pill-pending { background: var(--color-bg-subtle); color: var(--color-text-tertiary); }
.status-pill-warning { background: var(--color-warning); color: #fff; }
.status-pill-error   { background: var(--color-error); color: #fff; }


/* ============================================================
   STOCK CONFLICT BANNER — used on cart line when qty > available
   ============================================================ */
.stock-conflict-banner {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	padding: var(--space-sm) var(--space-md);
	background: var(--color-error-tint-6); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 6%, var(--color-bg-elevated));
	border: 1px solid var(--color-error-tint-30); /* fallback for iOS Safari <16.2 */
	border: 1px solid color-mix(in srgb, var(--color-error) 30%, transparent);
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	color: var(--color-text);
}
.stock-conflict-icon { color: var(--color-error); flex-shrink: 0; width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; }
.stock-conflict-body { flex: 1; }
.stock-conflict-action {
	margin-left: auto;
	flex-shrink: 0;
}


/* ============================================================
   STOCK INDICATOR — 4 states (ok/low/critical/out) with dot
   ============================================================ */
.stock-indicator {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	font-size: 0.8125rem;
	font-weight: 500;
}

.stock-indicator::before {
	content: '';
	width: 0.5rem;
	height: 0.5rem;
	border-radius: var(--radius-full);
	background: var(--color-text-tertiary);
	flex-shrink: 0;
}

.stock-indicator-ok       { color: var(--color-success); }
.stock-indicator-ok::before       { background: var(--color-success); }

.stock-indicator-low      { color: var(--color-warning); }
.stock-indicator-low::before      { background: var(--color-warning); }

.stock-indicator-critical { color: var(--color-warning); }
.stock-indicator-critical::before {
	background: var(--color-warning);
	animation: mfst-pulse 1.5s ease-in-out infinite;
}

.stock-indicator-out      { color: var(--color-error); }
.stock-indicator-out::before      { background: var(--color-error); }

@keyframes mfst-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: 0.55; transform: scale(1.4); }
}


/* ============================================================
   STICKY BUY BAR — mobile bottom CTA on product page
   ============================================================ */
.sticky-buy-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--z-sticky-buy-bar);
	background: var(--color-bg-elevated);
	border-top: 1px solid var(--color-border);
	box-shadow: 0 -8px 20px -8px rgba(0,0,0,0.12);
	padding: var(--space-sm) var(--space-md);
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}
@media (min-width: 768px) {
	.sticky-buy-bar { display: none; }
}

.sticky-buy-bar-price {
	flex: 1;
	min-width: 0;
}
.sticky-buy-bar-price .price-current { font-size: 1.125rem; }

.has-sticky-buy-bar { padding-bottom: 5rem; }
@media (min-width: 768px) {
	.has-sticky-buy-bar { padding-bottom: 0; }
}


/* ============================================================
   SUMMARY CARD — cart/checkout order summary sidebar
   ============================================================ */
.summary-card {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-lg);
}
@media (min-width: 1024px) {
	.summary-card-sticky {
		position: sticky;
		top: calc(var(--header-height) + var(--space-md));
	}
}

.summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--space-md);
	padding: var(--space-xs) 0;
	font-size: 0.9375rem;
	color: var(--color-text-secondary);
}

.summary-row-label  { color: var(--color-text-secondary); }
.summary-row-value  { color: var(--color-text); font-weight: 500; }

.summary-row-total {
	border-top: 1px solid var(--color-border);
	margin-top: var(--space-sm);
	padding-top: var(--space-md);
	font-size: 1.125rem;
}
.summary-row-total .summary-row-label,
.summary-row-total .summary-row-value {
	color: var(--color-text);
	font-weight: 700;
}


/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; flex-direction: column; }

.tab-list {
	display: flex;
	gap: var(--space-md);
	border-bottom: 1px solid var(--color-border);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	margin-bottom: var(--space-lg);
}
.tab-list::-webkit-scrollbar { display: none; }

.tab {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: var(--space-sm) var(--space-xs);
	color: var(--color-text-secondary);
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: color var(--transition-fast) var(--ease-out),
	            border-color var(--transition-fast) var(--ease-out);
	min-height: 2.75rem;
}
.tab:hover { color: var(--color-text); }
.tab[aria-selected='true'],
.tab.is-active {
	color: var(--color-primary);
	border-bottom-color: var(--color-primary);
	font-weight: 600;
}
.tab:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 4px;
	border-radius: var(--radius-sm);
}

.tab-panel { display: block; }
.tab-panel[hidden] { display: none; }


/* ============================================================
   TIMELINE — order status vertical timeline
   ============================================================ */
.timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: var(--space-md) 0;
}

.timeline-step {
	display: flex;
	gap: var(--space-md);
	padding-bottom: var(--space-lg);
	position: relative;
}
.timeline-step:last-child { padding-bottom: 0; }

.timeline-step-indicator {
	flex-shrink: 0;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-bg-subtle);
	color: var(--color-text-tertiary);
	border: 2px solid var(--color-border);
	font-size: 0.75rem;
	font-weight: 600;
	z-index: 1;
}

.timeline-step.is-active .timeline-step-indicator {
	background: var(--color-primary);
	color: var(--color-on-primary);
	border-color: var(--color-primary);
}
.timeline-step.is-done .timeline-step-indicator {
	background: var(--color-success);
	color: #fff;
	border-color: var(--color-success);
}

.timeline-step-line {
	position: absolute;
	left: 0.875rem;
	top: 1.75rem;
	bottom: 0;
	width: 2px;
	background: var(--color-border);
	transform: translateX(-1px);
}
.timeline-step.is-done .timeline-step-line { background: var(--color-success); }
.timeline-step:last-child .timeline-step-line { display: none; }

.timeline-step-content {
	flex: 1;
	padding-top: 0.125rem;
}

.timeline-step-title {
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: 0.125rem;
}

.timeline-step-meta {
	font-size: 0.8125rem;
	color: var(--color-text-tertiary);
}


/* ============================================================
   TOAST — programmatic notifications
   ============================================================ */
.toast-container {
	position: fixed;
	bottom: var(--space-md);
	right: var(--space-md);
	z-index: var(--z-toast);
	display: flex;
	flex-direction: column-reverse;
	gap: var(--space-sm);
	max-width: calc(100vw - var(--space-md) * 2);
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: var(--space-sm);
	min-width: 18rem;
	max-width: 24rem;
	padding: var(--space-md);
	border-radius: var(--radius-md);
	background: var(--color-bg-elevated);
	color: var(--color-text);
	box-shadow: var(--shadow-md);
	border-left: 4px solid var(--color-text-tertiary);
	font-size: 0.9375rem;
	pointer-events: auto;
	transform: translateX(0);
	opacity: 1;
	transition: transform var(--transition-medium) var(--ease-out),
	            opacity var(--transition-medium) var(--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: var(--radius-full);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	background: var(--color-text-tertiary);
}

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

.toast-action {
	background: transparent;
	color: var(--color-primary);
	font-weight: 600;
	font-size: 0.875rem;
	padding: var(--space-xs);
	margin-left: var(--space-xs);
	white-space: nowrap;
	cursor: pointer;
	border-radius: var(--radius-sm);
}
.toast-action:hover { background: var(--color-bg-subtle); }

.toast-close {
	/* P1-5 touch target sweep 2026-06-02 — WCAG 2.5.5 min 44x44. */
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	color: var(--color-text-tertiary);
	background: transparent;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.toast-close:hover { background: var(--color-bg-subtle); }

.toast-success { border-left-color: var(--color-success); }
.toast-success .toast-icon { background: var(--color-success); }
.toast-info    { border-left-color: var(--color-primary); }
.toast-info    .toast-icon { background: var(--color-primary); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-warning .toast-icon { background: var(--color-warning); }
.toast-error   { border-left-color: var(--color-error); }
.toast-error   .toast-icon { background: var(--color-error); }


/* ============================================================
   TRUST STRIP — sales count + repeat rate + recent buyers + IG
   ============================================================ */
.trust-strip {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-md);
	padding: var(--space-lg) 0;
	background: var(--color-bg-elevated);
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
}
@media (min-width: 768px) {
	.trust-strip { grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
}

.trust-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-xs);
	text-align: center;
	padding: var(--space-sm);
}

.trust-icon {
	font-size: 1.5rem;
	line-height: 1;
}

.trust-caption {
	font-size: 0.6875rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	color: var(--color-text-secondary);
	font-weight: 500;
}

.trust-value {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-primary);
}


/* ============================================================
   VARIANT BUTTON — weight/grind/size selector chips
   ============================================================ */
.variant-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	margin-bottom: var(--space-md);
}

.variant-group-label {
	font-size: 0.75rem;
	letter-spacing: var(--letter-spacing-caption);
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-text);
}

.variant-group-options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

.variant-button,
.variant-chip {
	padding: 0.625rem 1.125rem;
	min-height: 2.75rem;
	border: 2px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-bg-elevated);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: border-color var(--transition-fast) var(--ease-out),
	            background var(--transition-fast) var(--ease-out),
	            color var(--transition-fast) var(--ease-out);
	-webkit-tap-highlight-color: transparent;
}
.variant-button:hover,
.variant-chip:hover { border-color: var(--color-text); }
.variant-button.is-selected,
.variant-chip.is-selected,
.variant-button[aria-pressed='true'],
.variant-chip[aria-pressed='true'] {
	border-color: var(--color-primary);
	background: var(--color-primary-tint-5); /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg-elevated));
	color: var(--color-primary);
	font-weight: 600;
}
.variant-button:disabled,
.variant-chip:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	text-decoration: line-through;
}
.variant-button:focus-visible,
.variant-chip:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}


/* ============================================================
   WA FLOAT BUTTON — WhatsApp CS floating action
   Uses WhatsApp brand green #25D366 (external-locked color,
   exception to the no-hex rule. Wrap in CSS var so per-template
   theme.css CAN override if user wants).
   ============================================================ */
.wa-float-button,
.wa-float {
	position: fixed;
	bottom: var(--space-lg);
	right: var(--space-lg);
	z-index: var(--z-wa-float);
	width: 3.5rem;
	height: 3.5rem;
	min-width: 3.5rem;
	background: var(--color-wa, #25D366);
	color: #fff;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
	transition: transform var(--transition-medium) var(--ease-out);
	text-decoration: none;
}

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

.wa-float-button:focus-visible,
.wa-float:focus-visible {
	outline: 3px solid var(--color-bg);
	outline-offset: 2px;
}

.wa-float-pulse,
.wa-float-button {
	animation: mfst-wa-pulse 2.5s ease-in-out infinite;
}

@keyframes mfst-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);
	}
}

@media (max-width: 640px) {
	.wa-float-button,
	.wa-float {
		width: 3rem;
		height: 3rem;
		min-width: 3rem;
		bottom: var(--space-md);
		right: var(--space-md);
	}
}


/* ============================================================
   FILTER BAR — shop archive filter pills + sort select
   ============================================================ */
.filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	align-items: center;
	padding: var(--space-md) 0;
	border-bottom: 1px solid var(--color-border);
	margin-bottom: var(--space-lg);
}

.filter-pill {
	padding: 0.5rem 1rem;
	min-height: 2.5rem;
	background: transparent;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-full);
	color: var(--color-text);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background var(--transition-fast) var(--ease-out),
	            border-color var(--transition-fast) var(--ease-out),
	            color var(--transition-fast) var(--ease-out);
}
.filter-pill:hover { border-color: var(--color-text); }
.filter-pill.is-active,
.filter-pill[aria-pressed='true'] {
	background: var(--color-text);
	color: var(--color-bg);
	border-color: var(--color-text);
}
.filter-pill:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.filter-bar-sort {
	margin-left: auto;
	min-width: 12rem;
}


/* ============================================================
   CART LINE — cart row glue layout
   ============================================================ */
.cart-line {
	display: flex;
	gap: var(--space-md);
	padding: var(--space-md);
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	flex-wrap: wrap;
}

.cart-line-media {
	flex-shrink: 0;
	width: 5.5rem;
	height: 5.5rem;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--color-bg-subtle);
}
@media (min-width: 768px) {
	.cart-line-media { width: 7rem; height: 7rem; }
}
.cart-line-media img { width: 100%; height: 100%; object-fit: cover; }

.cart-line-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
}

.cart-line-header {
	display: flex;
	justify-content: space-between;
	gap: var(--space-sm);
	align-items: flex-start;
}

.cart-line-title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1rem;
	color: var(--color-text);
	margin: 0;
}
.cart-line-title a { color: inherit; }
.cart-line-title a:hover { color: var(--color-primary); }

.cart-line-variant {
	font-size: 0.8125rem;
	color: var(--color-text-tertiary);
}

.cart-line-actions {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	margin-top: auto;
	flex-wrap: wrap;
}

.cart-line-remove {
	background: transparent;
	color: var(--color-text-tertiary);
	font-size: 0.8125rem;
	/* P1-5 touch target sweep 2026-06-02 — WCAG 2.5.5 min 44x44. */
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: var(--space-xs) var(--space-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: color var(--transition-fast) var(--ease-out);
}
.cart-line-remove:hover { color: var(--color-error); }


/* ============================================================
   SKIP LINK — first focusable, becomes visible on :focus
   ============================================================ */
.skip-link {
	position: fixed;
	top: var(--space-sm);
	left: var(--space-sm);
	background: var(--color-primary);
	color: var(--color-on-primary);
	padding: var(--space-sm) var(--space-md);
	border-radius: var(--radius-md);
	font-weight: 500;
	z-index: var(--z-skip-link);
	transform: translateY(-200%);
	transition: transform var(--transition-fast) var(--ease-out);
}
.skip-link:focus,
.skip-link:focus-visible {
	transform: translateY(0);
	outline: 2px solid var(--color-on-primary);
	outline-offset: 2px;
	color: var(--color-on-primary);
}


/* ============================================================
   QUOTE — brand story callout
   ============================================================ */
.quote {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	padding: var(--space-xl);
	background: var(--color-bg-subtle);
	border-left: 4px solid var(--color-primary);
	border-radius: var(--radius-md);
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.5;
	color: var(--color-text);
}
.quote-icon { color: var(--color-primary); width: 2rem; height: 2rem; flex-shrink: 0; }
.quote-attribution {
	font-family: var(--font-body);
	font-style: normal;
	font-size: 0.875rem;
	color: var(--color-text-secondary);
	font-weight: 500;
}


/* ============================================================
   FADE-UP REVEAL ANIMATION — hero + section heads
   ============================================================ */
.fade-up {
	opacity: 0;
	transform: translateY(1rem);
	animation: mfst-fade-up var(--transition-slow) var(--ease-out) forwards;
}
.fade-up-delay-1 { animation-delay: 80ms; }
.fade-up-delay-2 { animation-delay: 160ms; }
.fade-up-delay-3 { animation-delay: 240ms; }
.fade-up-delay-4 { animation-delay: 320ms; }

@keyframes mfst-fade-up {
	to { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   TEXTURE OVERLAY — decorative dot pattern (hero accent)
   ============================================================ */
.texture-overlay { position: relative; }
.texture-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	/* fallback for iOS Safari <16.2 */
	background-image: radial-gradient(
		var(--color-primary-tint-14) 1px,
		transparent 1px
	);
	background-image: radial-gradient(
		color-mix(in srgb, var(--color-primary) 14%, transparent) 1px,
		transparent 1px
	);
	background-size: 1.25rem 1.25rem;
	pointer-events: none;
	opacity: 0.5;
	mask-image: radial-gradient(circle at center, #000 30%, transparent 70%);
	-webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 70%);
}


/* ============================================================
   PREFERS-REDUCED-MOTION — disable animations
   (Base.css handles global transition-duration override, this
   handles component-specific keyframe animations.)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	.btn-primary:hover,
	.card-lift:hover,
	.product-card:hover .product-card-img,
	.product-card:hover .product-card-media img,
	.wa-float-button:hover,
	.wa-float:hover,
	.social-icon:hover { transform: none !important; }

	.wa-float-pulse,
	.wa-float-button,
	.stock-indicator-critical::before,
	.skeleton,
	.fade-up,
	.spinner,
	.btn.is-loading::after,
	.btn[aria-busy='true']::after {
		animation: none !important;
	}

	.fade-up { opacity: 1; transform: none; }
	.skeleton { background: var(--color-bg-subtle); }
}


/* ============================================================
   INTEGRATIONS — third-party HTML normalization
   ------------------------------------------------------------
   NECESSARY EVIL: WooCommerce + Manifest plugin emit specific
   class names we don't control. Map them to design-system tokens
   here so the rest of the system stays clean.
   ALL !important usage in this file is confined to this section.
   ============================================================ */

/* --- WooCommerce --- */
.woocommerce ul.products li.product {
	background: var(--color-bg-elevated) !important;
	border-radius: var(--radius-md) !important;
	overflow: hidden;
	border: 1px solid var(--color-border) !important;
	transition: transform var(--transition-medium) var(--ease-out);
	padding: var(--space-md) !important;
}
.woocommerce ul.products li.product:hover { transform: translateY(-4px); }

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--color-primary) !important;
	font-weight: 700 !important;
	font-family: var(--font-display) !important;
}

.woocommerce div.product .product_title {
	font-family: var(--font-display) !important;
	letter-spacing: var(--letter-spacing-display);
	color: var(--color-text) !important;
}

.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	padding: 0.75rem 1.5rem !important;
	min-height: 2.75rem !important;
	border-radius: var(--radius-md) !important;
	font-family: var(--font-body) !important;
	font-weight: 500 !important;
	background: var(--color-primary) !important;
	color: var(--color-on-primary) !important;
	border: 2px solid var(--color-primary) !important;
	transition: background var(--transition-fast) var(--ease-out) !important;
	text-decoration: none !important;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: var(--color-primary-hover) !important;
	border-color: var(--color-primary-hover) !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: var(--radius-md) !important;
	padding: var(--space-md) !important;
	border-left-width: 4px !important;
}
.woocommerce-message {
	background: var(--color-success-tint-8) !important; /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-success) 8%, var(--color-bg-elevated)) !important;
	border-left-color: var(--color-success) !important;
}
.woocommerce-info    {
	background: var(--color-primary-tint-6) !important; /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg-elevated)) !important;
	border-left-color: var(--color-primary) !important;
}
.woocommerce-error   {
	background: var(--color-error-tint-6) !important; /* fallback for iOS Safari <16.2 */
	background: color-mix(in srgb, var(--color-error) 6%, var(--color-bg-elevated)) !important;
	border-left-color: var(--color-error) !important;
}


/* --- Manifest Plugin Frontend Output --- */
.manifest-fe-badge { /* maps to .badge */
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.625rem;
	border-radius: var(--radius-sm);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.manifest-fe-trust { /* maps to .trust-strip */
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-md);
	padding: var(--space-md) 0;
}
@media (min-width: 768px) {
	.manifest-fe-trust { grid-template-columns: repeat(4, 1fr); }
}

.manifest-fe-wa { /* maps to .wa-float */
	position: fixed;
	bottom: var(--space-lg);
	right: var(--space-lg);
	z-index: var(--z-wa-float);
	width: 3.5rem;
	height: 3.5rem;
	background: var(--color-wa, #25D366);
	color: #fff;
	border-radius: var(--radius-full);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}


/* --- External brand pills (Payment + Courier) ---
   These are externally-locked brand colors per audit findings.
   Documented inline; if a template needs custom Style Pack, the
   pill colors here are NOT meant to be themed.

   Style: OUTLINED — white fill, brand-color border + text.
   Reason: filled style failed WCAG AA (2.6–3.7:1 contrast on white text).
   Outlined preserves brand recognition via border + text color while
   meeting WCAG AA 4.5:1 normal-text minimum on white background.
   For brands whose pure hex would fail as text on white (cyan, mid-orange,
   mid-blue), text color uses a darkened brand shade; border keeps the
   original hex so visual brand identity stays intact. */
.pill-bca       { background: #fff; color: #0060AF; border: 1.5px solid #0060AF; } /* 6.6:1 AA */
.pill-mandiri   { background: #fff; color: #003D79; border: 1.5px solid #003D79; } /* 11.2:1 AAA */
.pill-bni       { background: #fff; color: #C24E10; border: 1.5px solid #F46A25; } /* text 4.6:1 AA; border keeps #F46A25 brand orange */
.pill-bri       { background: #fff; color: #003D7A; border: 1.5px solid #003D7A; } /* 11.2:1 AAA */
.pill-qris      { background: #fff; color: #C41818; border: 1.5px solid #E62121; } /* text 5.7:1 AA; border keeps QRIS red */
.pill-gopay     { background: #fff; color: #007A96; border: 1.5px solid #00AED6; } /* text 4.7:1 AA; border keeps GoPay cyan */
.pill-ovo       { background: #fff; color: #4C2FBA; border: 1.5px solid #4C2FBA; } /* 9.5:1 AAA */
.pill-dana      { background: #fff; color: #0A6BB0; border: 1.5px solid #118EEA; } /* text 4.8:1 AA; border keeps DANA blue */
.pill-shopeepay { background: #fff; color: #C03A1F; border: 1.5px solid #EE4D2D; } /* text 4.7:1 AA; border keeps ShopeePay orange */
.pill-jne       { background: #fff; color: #C41C19; border: 1.5px solid #E32320; } /* text 5.7:1 AA; border keeps JNE red */
.pill-jnt       { background: #fff; color: #C40010; border: 1.5px solid #E60012; } /* text 6.0:1 AA; border keeps J&T red */
.pill-sicepat   { background: #fff; color: #C4161D; border: 1.5px solid #E11A22; } /* text 5.6:1 AA; border keeps SiCepat red */
.pill-anteraja  { background: #fff; color: #B84E00; border: 1.5px solid #FF6B00; } /* text 4.7:1 AA; border keeps AntarAja orange */

/* End of components.css */
