/* MGK FreshMart — component styles for S-001 Homepage widgets.
   Layout uses flexbox/grid (no absolute positioning unless necessary). */

/* Pages render on the Elementor canvas template (no theme header/footer), so
   the UA default body margin is never reset anywhere else. */
body { margin: 0; }

/* Base typeface. Set on body, not on .mgk-fm: the canvas template renders
   sections straight into <body> without the theme wrapper, so a rule scoped to
   .mgk-fm matches nothing and everything falls back to the UA serif. Buttons
   and inputs don't inherit font from body per UA stylesheet, so name them too;
   the many `font-family: inherit` component rules then resolve to Quicksand. */
body,
button, input, select, textarea { font-family: var(--mgk-font); }

.mgk-fm, .mgk-fm__site { font-family: var(--mgk-font); color: var(--mgk-text); background: var(--mgk-bg); }
.mgk-fm * { box-sizing: border-box; }
.mgk-fm img { max-width: 100%; display: block; }

/* ── Shared atoms ──────────────────────────────────────────── */
/* width:100% + min-width:0 matter because every section is an Elementor
   flex-container child (e-flex/e-con) — a flex item's min-width defaults to
   auto, which stretches the item (and .mgk-section's max-width with it) to
   fit oversized content instead of clipping it, breaking any child's
   overflow-x:auto (e.g. .mgk-catrow) that relies on this section actually
   holding to --mgk-maxw. */
.mgk-section { max-width: var(--mgk-maxw); width: 100%; min-width: 0; margin: 0 auto; padding: 32px var(--mgk-pad-x); box-sizing: border-box; }

.mgk-grid { display: grid; gap: 16px; }
.mgk-grid--1 { grid-template-columns: repeat(1, 1fr); }
.mgk-grid--2 { grid-template-columns: repeat(2, 1fr); }
.mgk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mgk-grid--4 { grid-template-columns: repeat(4, 1fr); }
.mgk-grid--5 { grid-template-columns: repeat(5, 1fr); }
.mgk-grid--6 { grid-template-columns: repeat(6, 1fr); }

.mgk-sh { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.mgk-sh > div:first-child { flex: 1 1 auto; min-width: 0; }
/* Figma spec: Category/Flash Deals/Promo/Quick Reorder/Products want their
   CTA ("View all"/"Order history") centered against the FULL title+sub
   block, not top-aligned like .mgk-sh's own default above. Scoped to just
   these 5 — the exact same group the ≤640px phone rule below (search
   "Section heading") already treats as one family — rather than changing
   the shared .mgk-sh rule itself, which every other page using this
   component (Loyalty Wallet, Delivery Slot, Zone Checker, Reviews, …)
   would also inherit, including its OWN ≤720px column-mode text alignment
   (.mgk-sh switches to flex-direction:column there — align-items would
   then centre every title/sub block horizontally, not just this vertical
   CTA case). min-width:721px keeps this entirely above that breakpoint;
   the phone rule's own align-items:flex-end still wins below 640px since
   it's declared later and equally specific.
   Undo: restore mgk-retail.css.bak-20260811-sh-cta-vcenter. */
@media (min-width: 721px) {
	.mgk-category .mgk-sh,
	.mgk-flashwrap .mgk-sh,
	.mgk-promo .mgk-sh,
	.mgk-quickreorder .mgk-sh,
	.mgk-products .mgk-sh {
		align-items: center;
	}
}
.mgk-sh__title { font-size: 22px; font-weight: 800; color: var(--mgk-text); margin: 0; }
.mgk-sh__sub { font-size: 14px; color: var(--mgk-text-2); margin: 4px 0 0; }
/* Figma spec: Quick Reorder's .mgk-sh is exactly 44.5px tall at the 1440
   reference width (title 24px + sub 18px = 42px content, so the gap between
   them must be 2.5px, not the shared 4px every other .mgk-sh__sub uses).
   Scoped to .mgk-quickreorder only — .mgk-sh__sub above is shared by ~20
   other sections/pages, untouched.
   line-height:18px is explicit rather than the shared rule's implicit
   "normal" — "normal" is computed from the active font's own internal
   metrics, which isn't standardized across browsers/engines: confirmed by
   measurement that it renders sub at 18px tall (44.5px total, on spec) in
   one browser and 17px tall (43.5px total, 1px short) in another, same
   font/size/zoom, nothing else different. A literal px value removes that
   per-engine variance.
   Undo: restore mgk-retail.css.bak-20260811-quickreorder-sub-lineheight
   (this line-height) or mgk-retail.css.bak-20260811-quickreorder-sub-margin-2.5px
   (pre-existing margin-only version). */
.mgk-quickreorder .mgk-sh__sub { margin-top: 2.5px; line-height: 18px; }
/* Same fix, same reasoning, different section: Promo's .mgk-sh is also
   exactly 44.5px tall at the 1440 reference width (title 24px + sub 18px,
   2.5px gap between them) — was rendering at 46px (4px shared gap instead
   of 2.5px). Scoped to .mgk-promo only.
   Undo: restore mgk-retail.css.bak-20260811-promo-sh-sub-height. */
.mgk-promo .mgk-sh__sub { margin-top: 2.5px; line-height: 18px; }
/* Same fix, same reasoning, different section: "Today's Fresh Picks" (the
   Featured Products widget) also wants its .mgk-sh at exactly 44.5px tall
   at the 1440 reference width — was rendering at 50px (4px shared gap
   instead of 2.5px). Figma's own number for this frame is 68.5px, but that
   includes the 24px gap to the PRECEDING section (Category), which comes
   from Category's own margin-bottom and is already correct — this rule
   only fixes the remaining 44.5px, not a padding-top on this element
   (adding one would double that 24px gap to 48px).
   Scoped via [data-widget_type], not .mgk-products — Featured Products and
   Trending Products ("Popular in Singapore") share that class, and this
   Figma spec is Featured Products' only; same disambiguation the existing
   ~641px card-section rule above already uses for these two widgets.
   Undo: restore mgk-retail.css.bak-20260811-freshpicks-sh-sub-height. */
[data-widget_type="mgk_featured_products.default"] .mgk-sh__sub { margin-top: 2.5px; line-height: 18px; }
/* PDP "Similar products" (page-id-552) reuses the site-wide Featured Products
   widget, whose empty-string subtext falls back to the "Today's Fresh Picks"
   default copy (mgk_fm_resolve_atts()) rather than staying blank — hide the
   line here only, without touching that shared fallback. */
.page-id-552 .mgk-products .mgk-sh__sub { display: none; }

.mgk-card { background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); box-shadow: var(--mgk-shadow); padding: 20px; }

.mgk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; font-weight: 600; border: none; cursor: pointer; border-radius: var(--mgk-radius-sm); padding: 8px 16px; font-size: 14px; transition: opacity .15s; text-decoration: none; line-height: 1.2; }
.mgk-btn:hover { opacity: .9; }
.mgk-btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.mgk-btn.is-disabled:hover { opacity: .5; }
/* Loading spinner — .is-loading is already toggled by JS on ~15+ buttons
   site-wide (checkout Pay/Confirm & Pay, Click & Collect confirm, Add to
   Cart, Wishlist, Login/Logout, Save address — see mgk-storefront.js and
   mgk-retail.js) but had no visual treatment at all before this: the button
   looked completely idle for the full duration of a slow AJAX round trip
   (checkout's place_order→payment_start→confirm chain in particular can take
   several seconds). A leading spinner via ::before rather than hiding the
   label text — .mgk-btn is already display:inline-flex with gap:6px, so the
   pseudo-element just becomes another flex item, no layout hack needed, and
   border-color:currentColor means it auto-matches every button variant's
   existing text colour (white on --teal/--navy/--green/--red, navy on
   --outline/--white, blue on --link) with zero extra rules.
   Undo: restore mgk-retail.css.bak-20260813-btn-loading-spinner. */
.mgk-btn.is-loading { pointer-events: none; }
.mgk-btn.is-loading::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: mgk-btn-spin .6s linear infinite;
}
@keyframes mgk-btn-spin { to { transform: rotate(360deg); } }
.mgk-btn--lg { padding: 12px 20px; font-size: 15px; }
.mgk-btn--sm { padding: 6px 12px; font-size: 13px; }
.mgk-btn--xs { padding: 4px 8px; font-size: 12px; border-radius: var(--mgk-radius-sm); }
.mgk-btn--navy { background: var(--mgk-navy); color: #fff; }
.mgk-btn--teal { background: var(--mgk-teal); color: #fff; }
.mgk-btn--green { background: var(--mgk-green); color: #fff; }
.mgk-btn--red { background: var(--mgk-red); color: #fff; }
.mgk-btn--outline { background: #fff; color: var(--mgk-navy); border: 1.5px solid var(--mgk-navy); }
.mgk-btn--white { background: #fff; color: var(--mgk-navy); border: 1px solid var(--mgk-border); }
/* Plain text link button — home "View All" CTAs (Quick Reorder, Promotion, Category, Featured Products, Trending): no fill, no border, no bold. */
.mgk-btn--link { background: none; border: none; padding: 6px 4px; color: #165DFF; font-weight: 400; }
.mgk-btn--link:hover { opacity: .75; }
.mgk-btn--ghost { background: transparent; color: var(--mgk-navy); border: 1px solid transparent; }
.mgk-btn--ghost:hover { background: var(--mgk-bg-alt); opacity: 1; }

.mgk-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; }
/* Chip/Halal — Figma spec for the DIETARY CERT chips (Halal/Organic/SFA):
   24px tall, 4px/10px padding, 8px radius, Quicksand SemiBold 12/16, and NO
   border (the fill alone carries the colour — a border also pushed "Halal" to
   51.7px instead of the spec's 50px). Scoped to the three cert variants rather
   than .mgk-chip itself: that base class is shared by "Out of Stock",
   --sale/--save/--limit, order-status and cart chips, which keep their pill
   radius, border and own sizing. Figma's fixed width:50px is applied via
   min-width, not width — 50px is the measurement of "Halal" alone and would
   clip the longer "Organic"/"SFA" labels rendered in the same row.
   Colours are unchanged, straight off the existing tokens (already identical
   to the spec: #E4F5EC bg / #16875A text). */
.mgk-chip--halal, .mgk-chip--organic, .mgk-chip--sfa {
	flex-direction: row;
	min-width: 50px;
	height: 24px;
	padding: 4px 10px;
	gap: 4px;
	border: none;
	border-radius: 8px;
	font-family: 'Quicksand', var(--mgk-font);
	font-style: normal;
	font-weight: 600;
	font-size: 12px;
	line-height: 16px;
}
.mgk-chip--halal   { background: var(--mgk-halal-bg);   color: var(--mgk-halal); }
.mgk-chip--organic { background: var(--mgk-organic-bg); color: var(--mgk-organic); }
.mgk-chip--sfa     { background: var(--mgk-sfa-bg);     color: var(--mgk-sfa); }
.mgk-chip--teal    { background: var(--mgk-teal-bg);    color: var(--mgk-teal);    border: 1px solid rgba(0,153,179,.27); }
.mgk-chip--green   { background: var(--mgk-green-bg);   color: var(--mgk-green);   border: 1px solid rgba(34,168,107,.27); }
.mgk-chip--red     { background: var(--mgk-red-bg);     color: var(--mgk-red);     border: 1px solid rgba(232,80,64,.27); }
.mgk-chip--amber   { background: var(--mgk-amber-bg);   color: var(--mgk-amber);   border: 1px solid rgba(240,152,48,.27); }
.mgk-chip--grey    { background: var(--mgk-bg-alt);      color: var(--mgk-text-3);  border: 1px solid var(--mgk-border); }
.mgk-chip--picking   { background: #EDE9FE; color: #7C3AED; border: 1px solid rgba(124,58,237,.27); }
.mgk-chip--confirmed { background: #E3F0FF; color: var(--mgk-blue); border: 1px solid rgba(21,101,192,.27); }
.mgk-chip--default { background: var(--mgk-surface);    color: var(--mgk-text-2);  border: 1px solid var(--mgk-border); text-decoration: none; }
.mgk-chip--muted   { background: var(--mgk-bg-alt);      color: var(--mgk-text-2);  border: 1px solid var(--mgk-border); }
a.mgk-chip--default:hover { background: var(--mgk-border-lt); }
.mgk-hide-sm { display: inline; }

/* ── 001 Header ────────────────────────────────────────────── */
/* Three tiers: one row when wide → nav drops to its own full row below
   1230px → nav becomes a horizontally scrollable strip at phone widths.
   __left is display:contents so brand/nav/right lay out as siblings. */
/* Pinned across every page — Widget-001 is one shared header partial, so this
   single rule covers the whole site. Elementor wraps every widget in its own
   content-height .elementor-widget-container, which gives a position:sticky
   header zero room to stick within (its containing block is that wrapper,
   sized to the header itself) — position:fixed sidesteps that entirely by
   positioning against the viewport instead. body padding-top below (and the
   per-breakpoint overrides) compensate for taking the header out of flow. */
/* height:70px matches the 1440px spec exactly (content used to just be
   padding-driven, ~59px) — align-items:center (already set) centers the
   brand/nav/right row inside it; .mgk-header__search below sizes itself off
   this fixed 70px via a % height, so this number is now load-bearing, not
   just a floor. Vertical padding dropped (was 8px top/bottom): with height
   now fixed, that padding was shrinking the usable content-box to 54px while
   .mgk-header__right still claimed the full 70px, so it overflowed past the
   bottom edge instead of centering. Horizontal padding (24px) is unaffected
   — only vertical space was ever fighting the new fixed height. */
.mgk-header { position: fixed; top: 0; left: 0; right: 0; z-index: 500; height: 70px; background: #FFFFFF; color: var(--mgk-navy-900); display: flex; align-items: center; justify-content: space-between; gap: 12px 0; padding: 0 24px; flex-wrap: wrap; transition: transform .25s ease; }
/* The phone app bar's back arrow + screen title (header.php, shown by § 300 at
   ≤640px). Desktop has a full navigation bar and no app-bar concept, so both
   are hidden here — they are in the DOM at every width, and left visible they
   pushed the brand 95px right and shortened every account page by 44px. */
.mgk-header__back, .mgk-header__title { display: none; }
/* The Profile "Edit" pill belongs to the PHONE design only: there My Profile
   opens as a read-only readout and this switches it to the form. Desktop's spec
   is an always-editable form with no toggle (see profile.php's header), so the
   button has nothing to do there — left visible it rendered unstyled in the
   details head and stretched every account page by 42px. § 303 shows it back at
   ≤640px. */
.mgk-profile__edit { display: none; }
/* Likewise the phone-only "Account settings" chevron row (mockup line 3355).
   Desktop exposes password/addresses/privacy through its own layout, so this
   row would only duplicate them; § 303b shows it back at ≤640px. */
.mgk-profile__settings-row { display: none; }
/* The Account Settings hub is a PHONE screen: above 640px the account-nav
   sidebar already exposes Password / Addresses / Privacy, so the phone layout
   (§ 312 restyles it there) would duplicate it. Hiding the whole section left
   the desktop page blank between header and footer, so instead the phone
   chrome is dropped and the rows fall back to a plain centred link list —
   still usable for a direct visit or an old bookmark. */
/* The site-wide rule that zeroes the FIRST section's top padding (so home
   banners sit flush under the header) also catches this page, whose only
   section is the hub — hence the repeated first-child selector, matching how
   the account screens restore their own top padding further down. */
.mgk-section.mgk-acctset,
.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-acctset {
	max-width: 720px;
	margin: 0 auto;
	padding: 32px var(--mgk-pad-x, 16px) 64px;
}
.mgk-acctset__rows { display: flex; flex-direction: column; gap: 12px; }
.mgk-acctset__row {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 16px;
	border: 1px solid #E4E7EC; border-radius: 12px;
	background: #fff; text-decoration: none;
}
.mgk-acctset__row-label { font-weight: 600; color: #101828; }
.mgk-acctset__row-chev { color: #667085; }
/* Language, Log out and Delete account all already exist on desktop (Profile's
   "Preferred language" field, the sidebar's Sign Out, the Privacy page's
   Delete-account row), so they are not repeated here. */
.mgk-acctset__lang,
.mgk-acctset__actions { display: none; }
/* Auto-hide on scroll-down, reveal on scroll-up (toggled by mgk-retail.js) —
   translateY rather than display/visibility so the transition can animate. */
.mgk-header.is-hidden { transform: translateY(-100%); }
/* Exactly the fixed header's own height (70px) and no more — the first
   banner is meant to sit flush against the bar on desktop, so there is
   deliberately no extra breathing gap here. */
body { padding-top: 70px; }
/* The logged-in WP admin toolbar is ALSO position:fixed at top:0 with a much
   higher z-index — push our header below it (WP core's own values/breakpoint). */
body.admin-bar .mgk-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .mgk-header { top: 46px; } }
/* Whatever section renders right after the header's own top-level Elementor
   container still carried its own top padding (.mgk-section's 32px, etc.) —
   spacing that was meant to sit between stacked sections. With the header
   now taken out of flow, body's padding-top above already reserves the room
   it used to occupy, so that first section's own top padding just stacked
   an extra, visible gap on top of it. Zero it so content sits flush under
   the header everywhere, without touching spacing between later sections. */
.elementor > .elementor-element:first-child + .elementor-element .mgk-section {
	padding-top: 0;
}
/* Profile is an account page, not a home-style banner — the zeroed padding-top
   above left its content sitting flush under the fixed header on desktop.
   The ≤640px breakpoint already restores its own 14px (see § 301 below); this
   is that same restoration for desktop/tablet widths. */
.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-profile,
.mgk-section.mgk-profile {
	padding-top: 24px;
}
/* Reviews (S-026) is the same case: a content page whose back link ran flush
   into the fixed header. The design opens with 32px above the back link. */
.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-rev,
.mgk-section.mgk-rev {
	padding-top: 32px;
}
.mgk-header__left { display: flex; align-items: center; gap: 49px; min-width: 0; }
/* Figma spec: this cluster (brand + nav) is Fixed 691px wide at the 1440
   reference width, not content-hugged — only above the 1280px compaction
   breakpoint below, so the existing squeeze-to-fit behavior at narrower
   desktop widths (search field shrinking instead of wrapping) is untouched. */
@media (min-width: 1281px) {
	.mgk-header__left { width: 691px; flex: 0 0 691px; }
}
/* Figma spec: Home header's brand cluster is a FIXED 171×46 box at the 1440
   reference width (not Hug in practice — the live store name/address text
   varies in length, so the only way to hold an exact pixel size regardless
   of content is to fix it and truncate any text that overrun it). Logo
   grows to 46×46 to fill the height; brand-text gets the remaining
   171-46-10(gap)=115px and the location line (the one most likely to
   overrun, e.g. a long address) ellipsizes instead of wrapping/overflowing.
   Scoped to .mgk-header--home + ≥1281px so landing.php's Seasonal header
   (which reuses these same classes) and other pages/breakpoints are
   untouched.
   Undo: restore mgk-retail.css.bak-20260811-brand-fixed-171x46 (previous
   step) or mgk-retail.css.bak-20260811-brand-cluster-height (pre-fix
   original, 42×42 logo, no fixed width).
   Follow-up: the location line's ellipsis above still clipped "Paya Lebar ·
   409051" to "Paya Lebar · 4…" (113px of text in a 93px slot) without
   touching this box's own 171×46 — dropped font-size to 9.5px (below) so
   the full string fits with a few px to spare. Undo that specific step:
   /tmp/mgk-retail-undo/.../mgk-retail.css.bak-20260811-location-fontsize-9.5px. */
@media (min-width: 1281px) {
	.mgk-header--home .mgk-header__logo { width: 46px; height: 46px; }
	.mgk-header--home .mgk-header__brand { width: 171px; }
	.mgk-header--home .mgk-header__brand-text { flex: 1 1 auto; min-width: 0; }
	.mgk-header--home .mgk-header__brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.mgk-header--home .mgk-header__location { min-width: 0; font-size: 9.5px; }
	.mgk-header--home .mgk-header__location > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.mgk-header__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--mgk-navy-900); flex-shrink: 0; }
.mgk-header__logo { background: none; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-family: 'Quicksand', var(--mgk-font); font-weight: 700; font-size: 16px; color: #061937; border: 1.5px solid #0E3B81; }
.mgk-header__logo--img { border: none; background: none; object-fit: contain; }
.mgk-header__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.mgk-header__brand-name { font-family: var(--mgk-font); font-weight: 700; font-size: 20px; line-height: 17.5px; color: #061937; }
.mgk-header__location { display: flex; align-items: center; gap: 6px; padding: 6px 0 0; margin-top: 2px; color: #1B3A52; opacity: .7; font-size: 12px; font-weight: 600; line-height: 1; }
.mgk-header__location svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
/* Pinned to a literal 404px (not hug-content) so it renders identically across
   browsers instead of drifting a few px with each engine's text shaping —
   flex:0 0 404px stops it from being compressed inside .mgk-header__left's
   fixed 691px box. */
.mgk-header__nav { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; min-width: 0; width: 404px; flex: 0 0 404px; }
.mgk-header__nav a { font-family: 'Quicksand', var(--mgk-font); color: #0A2A5C; text-decoration: none; font-size: 14px; font-weight: 700; opacity: .7; transition: opacity .15s; white-space: nowrap; }
.mgk-header__nav a:hover { opacity: 1; }
.mgk-header__nav a.is-active { opacity: 1; font-weight: 800; color: #061937; }
/* "Welcome, {name}" / "Sign in" row only exists for the mobile burger
   dropdown (UI-html/home-mobie.svg) — desktop/tablet already surface the
   same Profile/Login destination via .mgk-header__user's account icon, so
   this stays hidden until the ≤720px block below turns the dropdown on. */
.mgk-header__nav-user { display: none; }
/* Right-hand cluster: height:70px is the 1440px mockup's header-row baseline
   — .mgk-header__search below sizes itself as a % of THIS box (57.14% =
   40/70), not of .mgk-header itself, since padding there would throw the
   ratio off. gap is 4px per the mockup's "3 corner buttons" spacing (cart /
   notif-wrap / user) — the search form is also a direct flex child here so
   it inherits the same 4px before the first pill. */
.mgk-header__right { display: flex; align-items: center; gap: 4px; flex: 1 0 0; justify-content: flex-end; min-width: 0; height: 70px; margin-left: 24px; }
/* Figma spec: this cluster (search/cart/bell/user) is Fill 701px with an
   8px gap at the 1440 reference width — .mgk-header__left's own 691px fixed
   width (above, same ≥1281px zone) already accounts for the two clusters
   meeting with no extra space between them (691 + 701 = 1392 = 1440 minus
   the header's 24px side padding), so the margin-left that used to buy that
   breathing room at every width is redundant here and shrinks this cluster
   below spec; zero it out only in this ≥1281px zone. */
@media (min-width: 1281px) {
	.mgk-header__right { gap: 8px; margin-left: 0; }
}
.mgk-header__pill { background: transparent; padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--mgk-navy-900); white-space: nowrap; }
.mgk-header__cart { position: relative; text-decoration: none; }
/* Badge is anchored to this icon-sized wrapper (not the 40px hit-box above),
   so the cart-count/notif-count offsets below hug the icon's own corner
   instead of floating out at the corner of the larger click target. */
.mgk-header__icon { position: relative; display: inline-flex; }
.mgk-header__user svg, .mgk-header__notifications svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.mgk-header__notifications svg { height: 20px; }
.mgk-header__user svg { width: 20px; height: 20px; }
/* Shared box for the small count/alert badge on the cart and bell icons. */
.mgk-header__badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px; background: var(--mgk-red); color: rgba(255,255,255,.9); font-size: 10px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.mgk-header__badge[hidden] { display: none !important; }
/* Sized to the 1440px desktop spec exactly: width is 565/1440 of the
   viewport (39.24vw, clamped so it neither vanishes on narrow desktop
   windows nor balloons on ultra-wide ones); height is 40/70 of its direct
   parent .mgk-header__right's own 70px height (57.14%), matching the
   mockup's height ratio literally rather than approximating it with vw. */
.mgk-header__search { position: relative; gap: 8px; min-width: 0; height: 57.14%; flex: 0 1 max(320px, min(680px, 39.24vw)); max-width: none; border: 1px solid #86909C; }
.mgk-header__search-icon { background: none; border: 0; padding: 0; cursor: pointer; line-height: 1; color: #1A2630; display: inline-flex; }
.mgk-header__search-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mgk-header__search-input { font-family: 'Quicksand', var(--mgk-font); background: transparent; border: 0; outline: none; color: #061937; font-size: 14px; width: 100%; min-width: 0; }
.mgk-header__search-input::placeholder { color: rgba(6,25,55,.6); }
.mgk-header__burger { display: none; background: none; border: 0; color: var(--mgk-navy-900); font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.mgk-header__search:focus-within { background: var(--mgk-bg-alt); box-shadow: 0 0 0 1px #E9EBEF inset; }
.mgk-header__zone { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--mgk-navy-900); text-decoration: none; white-space: nowrap; }
.mgk-header__user, .mgk-header__notifications, .mgk-header__cart { border: none; }
.mgk-header__user, .mgk-header__notifications, .mgk-header__cart { width: 40px; height: 40px; justify-content: center; padding: 0; color: #061937; flex-shrink: 0; }

/* Account icon → avatar + dropdown (guest: "Sign in" CTA; signed-in: Account
   profile / Order history / Privacy & notification / Support / Log out).
   Same click-toggle + [hidden] pattern as .mgk-header__notif-wrap below, not
   :hover — consistent with every other dropdown on the site and works on
   touch. Desktop/tablet only; mobile keeps the burger's single-link row (see
   .mgk-header__nav-user above) and hides this wrap entirely (§ 3507, 3768). */
.mgk-header__user-wrap { position: relative; }
/* 40x40 fills the same footprint as .mgk-header__user's own pill box (§ 393)
   exactly, with the pill's padding:0 override — so the avatar reads as the
   same size as the icon it replaces, not a smaller image floating inside it.
   Selector is qualified with the wrap (not just the bare class) so its
   specificity (0,2,0) beats Elementor's `.elementor img { height:auto;
   max-width:100% }` reset (0,1,1) — with only 0,1,0 the photo rendered at its
   natural aspect ratio scaled to 40px wide instead of a 40px circle. */
.mgk-header__user-wrap .mgk-header__user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center; max-width: none; }
.mgk-header__user-avatar--initials { display: flex; align-items: center; justify-content: center; background: #E8F3FF; color: #1363FF; font-size: 15px; font-weight: 700; }
.mgk-header__user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 220px; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: 16px; box-shadow: var(--mgk-shadow-lg); padding: 8px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; }
.mgk-header__user-dropdown[hidden] { display: none !important; }
.mgk-header__user-item { display: block; padding: 10px 12px; border-radius: 10px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 600; color: var(--mgk-navy-900); text-decoration: none; white-space: nowrap; }
.mgk-header__user-item:hover { background: var(--mgk-bg-alt); }
.mgk-header__user-item--signout { color: var(--mgk-red); }
.mgk-header__user-item--cta { background: var(--mgk-blue); color: #fff; text-align: center; }
.mgk-header__user-item--cta:hover { background: var(--mgk-blue); opacity: .92; }

/* Notification bell badge + dropdown (mgk-retail.js polls mgk_user_notifications_poll
   every 15s, same cadence as the Order Tracking status poll). Badge shares
   .mgk-header__badge with the cart count (absolute dot on a position:relative parent). */
.mgk-header__notif-wrap { position: relative; }
.mgk-header__notifications { position: relative; }
.mgk-notif__dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 548px; max-width: 90vw; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: 16px; box-shadow: var(--mgk-shadow-lg); padding: 24px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.mgk-notif__dropdown[hidden] { display: none !important; }
.mgk-notif__header { display: flex; align-items: center; justify-content: space-between; padding: 0; width: 100%; box-sizing: border-box; }
.mgk-notif__title { font-family: 'Quicksand', sans-serif; font-size: 18px; font-weight: 700; color: var(--mgk-blue); line-height: 28px; margin: 0; }
.mgk-notif__unread-text { font-family: 'Quicksand', sans-serif; font-size: 12px; font-weight: 500; color: var(--mgk-blue); line-height: 16px; margin: 0; }
.mgk-notif__body { max-height: 420px; overflow-y: auto; padding: 0; display: flex; flex-direction: column; width: 100%; box-sizing: border-box; }
.mgk-notif__empty { margin: 16px 8px; font-size: 13px; color: var(--mgk-navy-800); opacity: .7; text-align: center; }
.mgk-notif__list { display: flex; flex-direction: column; width: 100%; }
.mgk-notif__item { display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; text-decoration: none; border-bottom: 1px solid var(--mgk-border-lt); border-top: 1px solid var(--mgk-border-lt); margin-top: -1px; width: 100%; box-sizing: border-box; }
.mgk-notif__item:first-child { border-top: 1px solid var(--mgk-border-lt); }
.mgk-notif__item:hover { background: var(--mgk-bg-alt); }
.mgk-notif__item.is-unread .mgk-notif__item-title { position: relative; }
.mgk-notif__item.is-unread .mgk-notif__item-title::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 999px; background: var(--mgk-red); vertical-align: middle; }
.mgk-notif__item-title { display: block; font-family: 'Quicksand', sans-serif; font-size: 14px; font-weight: 600; color: var(--mgk-blue); line-height: 20px; }
.mgk-notif__item-msg { display: block; font-family: 'Quicksand', sans-serif; font-size: 12px; font-weight: 400; color: var(--mgk-text); line-height: 16px; }
.mgk-notif__item-time { display: block; font-family: 'Quicksand', sans-serif; font-size: 12px; font-weight: 400; color: var(--mgk-text-3); line-height: 16px; margin: 0; opacity: 1; }
.mgk-notif__footer { display: flex; justify-content: center; align-items: flex-start; padding: 0; width: 100%; box-sizing: border-box; }
.mgk-notif__viewall { display: inline-block; font-family: 'Quicksand', sans-serif; font-size: 14px; font-weight: 600; color: var(--mgk-blue); line-height: 20px; text-decoration: none; }
.mgk-notif__viewall:hover { text-decoration: underline; }
@media (max-width: 1280px) {
	/* Compact the row so brand + nav + utilities stay on ONE line on
	   ordinary desktops (real-browser fonts run ~5% wider than headless).
	   This alone doesn't change the header's rendered height (fixed at 70px
	   all the way down to 1141px), so body's padding-top stays put here —
	   it only changes once the nav actually wraps to its own row below.
	   Horizontal-only, like the base rule — vertical padding would eat into
	   the fixed 70px height and overflow .mgk-header__right past the bottom
	   edge again. */
	.mgk-header { padding: 0 16px; }
	.mgk-header__nav { gap: 12px; }
	.mgk-header__nav a { font-size: 13px; }
}
@media (max-width: 1140px) {
	.mgk-header__left { gap: 24px; }
}

/* ── 002 Hero ──────────────────────────────────────────────── */
/* Single flat banner image (heading/trust icons/seal/ribbon/foot-bar are all
   baked into the exported design asset) — see home/hero.php. Full-bleed:
   overrides .mgk-section's own padding/max-width so this one section runs
   edge-to-edge with zero margin, unlike every other section on the page.
   Fixed aspect-ratio (var so Elementor's "size" style control can override
   it, see mgk-elementor.php; default 1440/380 matches UI-html/home.css's
   Hero frame) + object-fit:cover — same shape as the .mgk-banner-ph
   placeholder below — so a merchant-uploaded banner of the wrong aspect
   ratio gets cropped to fit instead of stretching or collapsing the
   section's height. */
.mgk-section.mgk-hero { max-width: none; margin: 0; padding: 0; }
.mgk-hero {
	position: relative;
	background: var(--mgk-surface);
	/* The reference hero frame is 1488×467 (≈3.186:1). The generated source is
	   intentionally taller so object-fit can crop it cleanly at every desktop
	   width without clipping the product cluster on the right. */
	--mgk-hero-ratio: 3.186;
	--mgk-hero-blue: #1363FF;
	/* Hover tone for Shop Now: identical hue (219.7°) and saturation (100%),
	   lightness 53.7% → 41.8%, i.e. the −12% the brief asks for. A literal, not
	   a filter, so the label and icon stay exactly as they were — the other
	   half of that requirement. */
	--mgk-hero-blue-dark: #0048D5;
}
.mgk-hero__banner { display: block; width: 100%; aspect-ratio: var(--mgk-hero-ratio); object-fit: cover; object-position: right center; }
/* The wash the original Group 18.svg painted over its own left third, rebuilt
   as CSS with the same stops (#D9E8F7, solid → 50% → 0 across 25/40/55%). As a
   gradient it is resolution-independent, so it stays clean where the baked one
   softened with the raster it was flattened into. */
/* :not(.mgk-cathero2) matters: the Category Hero (widget 012) deliberately
   reuses .mgk-hero for the flat-banner pattern, so an unscoped wash here
   painted a pale band across ITS placeholder too -- which is what made
   /category-landing/ look like it had grown a blank section. */
.mgk-hero:not(.mgk-cathero2)::before {
	content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(90deg, #D9E8F7 0%, #D9E8F7 25%, rgba(217,232,247,.5) 40%, rgba(217,232,247,0) 55%);
}
/* Offset as a PERCENTAGE, not a centred max-width box: 5.75% follows the
   reference's 86px left gutter at 1488px while still scaling fluidly. */
.mgk-hero__inner { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; padding: 0 5.75%; }
/* Everything in the copy column is sized in em off this ONE value, so the whole
   block scales with the banner instead of the type staying put while the picture
   stretches. 1.05vw resolves to 15.6px at the 1488px reference width. */
.mgk-hero__copy { font-size: clamp(10px, 1.05vw, 18px); max-width: 34em; }

.mgk-hero__heading { margin: 0 0 .7em; font-weight: 800; font-size: 3.5em; line-height: 1.14; letter-spacing: -.02em; }
.mgk-hero__heading-top, .mgk-hero__heading-accent { display: block; }
.mgk-hero__heading-top { color: var(--mgk-navy-900); }
/* Left-to-right lightening, as in the design. background-clip:text needs a
   colour to clip, so the solid stays declared first and doubles as the fallback
   anywhere the clip is unsupported. */
.mgk-hero__heading-accent {
	color: #2666CC;
	background: linear-gradient(90deg, #2666CC 0%, #63A0EE 100%);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent;
}
.mgk-hero__sub { margin: 0 0 1.75em; max-width: 26em; font-size: 1.125em; font-weight: 500; line-height: 1.55; color: #4B5563; }

.mgk-hero__ctas { display: flex; flex-wrap: wrap; gap: .875em; }
.mgk-hero__btn {
	display: inline-flex; align-items: center; gap: .75em;
	min-height: 3.5em; padding: 0 1.375em 0 1.75em;
	border: 1.5px solid var(--mgk-hero-blue); border-radius: .625em;
	font-family: inherit; font-size: 1em; font-weight: 700; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.mgk-hero__btn-arrow { flex: 0 0 auto; width: 1.625em; height: 1.625em; }
/* Shop Now — darker ground on hover, label and icon deliberately untouched. */
.mgk-hero__btn--primary { background: var(--mgk-hero-blue); color: #fff; }
.mgk-hero__btn--primary:hover,
.mgk-hero__btn--primary:focus-visible { background: var(--mgk-hero-blue-dark); border-color: var(--mgk-hero-blue-dark); color: #fff; }
/* Browse Categories — fills with the brand blue. The ring and arrow are stroked
   in currentColor, so they turn white with the label and need no rule at all. */
.mgk-hero__btn--ghost { background: #fff; color: var(--mgk-hero-blue); }
.mgk-hero__btn--ghost:hover,
.mgk-hero__btn--ghost:focus-visible { background: var(--mgk-hero-blue); color: #fff; }
.mgk-hero__btn:focus-visible { outline: 3px solid rgba(19, 99, 255, .35); outline-offset: 2px; }

/* nowrap on the row, not on each label: four marks and three rules have to hold
   one line at the design width, which is what the wrapped version lost. */
.mgk-hero__marks { display: flex; flex-wrap: nowrap; align-items: center; margin: 2.25em 0 0; padding: 0; list-style: none; }
.mgk-hero__mark { display: inline-flex; align-items: center; gap: .5em; padding: 0 1.125em; border-left: 1px solid rgba(27, 58, 82, .16); }
.mgk-hero__mark:first-child { padding-left: 0; border-left: 0; }
.mgk-hero__mark-chip { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; border-radius: 50%; background: rgba(19, 99, 255, .1); color: var(--mgk-hero-blue); }
.mgk-hero__mark-icon { width: 1.125em; height: 1.125em; }
.mgk-hero__mark-text { font-size: .875em; font-weight: 500; line-height: 1.35; color: var(--mgk-navy-900); white-space: nowrap; }

/* Below this the banner's subject and the copy fight for the same pixels, and
   no aspect ratio can hold copy that is real text at real sizes. The image
   drops to an absolutely-positioned background and the copy returns to normal
   flow, so the SECTION is as tall as its words — never shorter. object-position
   swings to the quiet left edge; the subject is cropped away deliberately. */
@media (max-width: 820px) {
	.mgk-hero { --mgk-hero-ratio: auto; }
	/* Scoped through .mgk-hero (0-2-0) on purpose: Elementor ships
	   `.elementor img { height: auto }` at 0-1-1, which outranks a bare
	   .mgk-hero__banner and silently collapsed this to the image's own
	   intrinsic height instead of filling the section. */
	.mgk-hero .mgk-hero__banner { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: left center; }
	.mgk-hero__inner { position: static; min-height: 340px; padding: 2em 5%; }
	.mgk-hero__copy { font-size: 15px; max-width: 100%; }
	.mgk-hero__sub { max-width: 30em; }
	/* One line stops being possible; wrap and drop the rules, spacing carries it. */
	.mgk-hero__marks { flex-wrap: wrap; gap: .6em 1.25em; }
	.mgk-hero__mark { padding: 0; border-left: 0; }
}
@media (max-width: 640px) {
	.mgk-hero__inner { min-height: 244px; padding: 1.6em 5%; }
	.mgk-hero__copy { font-size: 13.5px; }
	.mgk-hero__heading { font-size: 2.25em; }
}

/* The "Full-bleed" comment above cancels this section's OWN padding, but
   Elementor's own Container wrapper (.e-con-full, one per top-level widget on
   this page) still has its default 10px side padding — that's a layer above
   this theme's CSS, so the override above never reached it. Result: the
   banner rendered at 1420×374.7 instead of the Figma-spec 1440×380 at the
   1440 reference width. :has() targets only the container that's a direct
   parent of this specific widget, so every other section's own .e-con-full
   (Marquee, Flash Deals, Promo, ...) keeps its 10px untouched.
   Undo: restore mgk-retail.css.bak-20260811-hero-full-bleed. */
.e-con-full:has(> .elementor-widget-mgk_hero_v2),
.e-con-full:has(> .elementor-widget-mgk_hero) { padding-left: 0; padding-right: 0; }

/* Shared empty-state for every flat Store Setup banner (hero/appliance/landing)
   — shown instead of the real <img> when no image is configured yet, or that
   <img> fails to load (onerror in the templates swaps to this sibling). Same
   soft gradient as the Hero v2 no-photo state for a consistent look. Hero's
   own instance is full-bleed like .mgk-hero__banner above; appliance/landing
   still sit inside their section's padding, so they keep the rounded corners. */
.mgk-banner-ph { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: var(--mgk-banner-ph-ratio, 2.4); border-radius: var(--mgk-radius-lg); background: linear-gradient(135deg, #EAF1FB, #F5F8FD); }
.mgk-hero .mgk-banner-ph { border-radius: 0; --mgk-banner-ph-ratio: var(--mgk-hero-ratio); }
.mgk-abanner .mgk-banner-ph { --mgk-banner-ph-ratio: var(--mgk-abanner-ratio); }
.mgk-banner-ph[hidden] { display: none; }
.mgk-banner-ph__icon { font-size: 64px; filter: drop-shadow(0 14px 30px rgba(0,13,38,.15)); }

/* ── Hero, HTML variant (home.svg) ─────────────────────────── */
/* Full-bleed edge-to-edge: the page has no max-width column anymore, so the
   hero just needs the same side padding as every other section. */
.mgk-herov2 { position: relative; display: flex; align-items: center; gap: 40px; min-height: 420px; background: linear-gradient(135deg, #EAF1FB, #F5F8FD); flex-wrap: wrap; overflow: hidden; width: 100%; border-radius: 0; padding: 48px var(--mgk-pad-x); }
.mgk-herov2--photo { background-size: cover; background-position: center; }
/* Narrower than the original 56/72/88% stops — those hid more of the banner
   photo than the text column (~420-460px) actually needs covered, especially
   now the section runs full viewport width with no upper cap. Tightened so
   more of the real photo/graphic shows through past the text, at the cost
   of a lighter fade directly behind the CTAs on the narrower end of that
   range. */
.mgk-herov2__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #EAF1FB 0%, #EAF1FB 44%, rgba(234,241,251,.55) 54%, rgba(234,241,251,0) 66%); }
.mgk-herov2__left { position: relative; z-index: 2; flex: 1 1 420px; min-width: 320px; }
.mgk-herov2__tag { display: inline-block; background: #fff; border: 1px solid var(--mgk-border); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--mgk-navy-900); margin-bottom: 16px; }
.mgk-herov2__heading { font-size: 40px; line-height: 1.15; font-weight: 800; color: var(--mgk-navy-900); margin: 0 0 14px; }
.mgk-herov2__accent { color: var(--mgk-cta-blue); }
.mgk-herov2__sub { font-size: 15px; color: var(--mgk-text-2); max-width: 460px; margin: 0 0 22px; }
.mgk-herov2__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mgk-herov2__checks { font-size: 12.5px; font-weight: 600; color: rgba(27,58,82,.65); }
.mgk-herov2__right { position: relative; z-index: 2; flex: 1 1 280px; min-width: 240px; height: 260px; display: flex; align-items: center; justify-content: center; }
.mgk-herov2__emoji { font-size: 120px; filter: drop-shadow(0 14px 30px rgba(0,13,38,.25)); }
.mgk-herov2__pills { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mgk-herov2__pill { position: absolute; background: #fff; box-shadow: 0 8px 18px rgba(0,13,38,.2); border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 12.5px; color: var(--mgk-navy-900); white-space: nowrap; }
.mgk-herov2__pill--1 { top: 16%; left: 58%; transform: rotate(7deg); }
.mgk-herov2__pill--2 { bottom: 24%; right: 8%; background: var(--mgk-green, #16875A); color: #fff; transform: rotate(-6deg); }
.mgk-herov2__pill--3 { bottom: 10%; left: 60%; background: var(--mgk-red); color: #fff; transform: rotate(-8deg); }
@media (max-width: 768px) {
	.mgk-herov2 { padding: 28px; min-height: 0; background-image: none !important; }
	.mgk-herov2__heading { font-size: 30px; }
	.mgk-herov2__right, .mgk-herov2__pills, .mgk-herov2__scrim { display: none; }
}

/* ── 006b Appliance Banner ─────────────────────────────────── */
.mgk-btn--blue { background: var(--mgk-blue); color: #fff; }
/* Rebuilt like the Home hero: the image is decorative and every word/button is
   real HTML. The 5.14:1 frame follows the supplied supporting-banner reference
   and stays deliberately much lower than the 3.186:1 lead hero. */
.mgk-abanner {
	position: relative; isolation: isolate; overflow: hidden;
	--mgk-abanner-ratio: 5.14;
	--mgk-hero-blue: #1363FF;
	--mgk-hero-blue-dark: #0048D5;
	background: #DDECFB;
}
.mgk-abanner__img {
	display: block; width: 100%; aspect-ratio: var(--mgk-abanner-ratio);
	object-fit: cover; object-position: right center; border-radius: inherit;
}
.mgk-abanner::before {
	content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(90deg, #DDECFB 0%, rgba(221,236,251,.98) 30%, rgba(221,236,251,.58) 47%, rgba(221,236,251,0) 62%);
}
.mgk-abanner__inner {
	position: absolute; inset: 0; z-index: 2;
	display: flex; align-items: center; padding: 0 5.75%;
}
.mgk-abanner__content { max-width: 48em; font-size: clamp(11px, 1vw, 17px); }
.mgk-abanner__heading {
	margin: 0 0 .4em; color: #1761C9;
	font-size: 3em; font-weight: 800; line-height: 1.12; letter-spacing: -.025em;
}
.mgk-abanner__sub { margin: 0 0 1.7em; color: var(--mgk-navy-900); font-size: 1.25em; font-weight: 500; line-height: 1.5; }
.mgk-abanner__ctas { display: flex; flex-wrap: wrap; gap: .875em; }
.mgk-abanner__btn { min-width: 13.5em; justify-content: center; }

@media (max-width: 820px) {
	.mgk-abanner { --mgk-abanner-ratio: auto; min-height: 340px; }
	.mgk-abanner .mgk-abanner__img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-position: left center; }
	.mgk-abanner__inner { position: static; min-height: 340px; padding: 2em 5%; }
	.mgk-abanner__content { max-width: 100%; font-size: 15px; }
	.mgk-abanner__heading { font-size: 2.4em; }
}

/* ── 011 Quick Reorder ─────────────────────────────────────── */
/* "mgk-quickreorder" prefix (NOT "mgk-reorder" — that belongs to the
   unrelated S-030 Reorder-past-order page, see line ~790). Sits in the
   shared .mgk-section max-width column, same as the rest of the Home page;
   heading/CTA row and order row both use that column's width.
   Layout: one horizontally scrolling strip at EVERY breakpoint. The card is
   a fixed width (260px desktop, set by the ≤640px phone block on mobile) and
   never grows or shrinks, so the viewport alone decides how many are visible
   and PHP renders every order mgk_past_orders() returns — no per-breakpoint
   card count, no hiding rule, no per-tier "View All". This replaced the old
   4/3/4/3-col wrapping grid, whose :nth-child(n+4) rule existed only to stop
   a lone card wrapping onto a partial row; a scroller has no partial rows.
   Historical note for anyone diffing against the Figma: the mockup shows the
   desktop grid, but the scroll strip is the deliberate current behaviour.
   Each card shows up to 3 product thumbnails from that order plus the order
   number, not a single product. */
/* Card = Figma "Card" frame: 260×126 FIXED, padding 20, gap 12, radius 16,
   1px #D5E2EE (already --mgk-border/--mgk-surface). Inside, Figma's "Frame 63"
   is 218×84 (= the card's 260 minus 2×20 padding and 2×1 border) and holds a
   160px text/thumb column plus the 24px button, `align-items: flex-end`, with
   the 34px gap between them being the leftover 218 − 160 − 24.
   Implemented as a 2×2 GRID rather than a wrapping flex row: the markup order
   is media → body(name) → add, and with flex-wrap the browser picks line breaks
   from each item's UNSHRUNK basis, which kept dropping the 24px button onto a
   third line. Grid places all three explicitly — name spanning row 1, thumbs
   and button sharing row 2 — so no wrap heuristic is involved.
   Row 2's columns are `auto auto` (not 1fr): the thumb strip must stay its
   natural 160px so the 34px gap to the button is exactly the spec's, instead of
   1fr stretching it to fill the card.
   The 260px width is honoured with justify-items:start on the row + a 260px
   max-width, so the cards keep the Figma size and simply left-align in the
   wider 4-col grid track rather than stretching past it. */
/* Figma spec: the title+sub label block is exactly 518.33px wide at the 1440
   reference width — a fixed frame, not "fill remaining row width" like the
   shared .mgk-sh > div:first-child rule above (flex:1 1 auto) gives every
   other section using .mgk-sh. That shared rule stretches the label to
   whatever space is left beside the CTA (~1303px here); Figma's label stays
   its own fixed size regardless, leaving a deliberate gap before the CTA.
   flex: 0 0 518.33px disables both grow and shrink so the box holds this
   exact size at any viewport — intentionally non-responsive, matching the
   fixed Figma frame rather than reflowing with the section width.
   Scoped to .mgk-quickreorder only; the other ~20 sections/pages sharing
   .mgk-sh keep the stretching behaviour untouched.
   Undo: restore mgk-retail.css.bak-20260811-quickreorder-heading-width-518. */
.mgk-quickreorder .mgk-sh > div:first-child { flex: 0 0 518.33px; width: 518.33px; }
/* Horizontal scroll strip at every breakpoint. The card holds its exact Figma
   260px (flex-basis with grow AND shrink off) and the viewport decides how many
   fit — so the card never resizes to fill a track, and the old 901-1000px
   overflow problem is gone by construction: overflow here is scroll, not clip.
   Every fetched order is reachable by scrolling, so nothing is hidden. */
/* Figma spec: 16px gap at the 1440 reference width (was 20px). This class is
   scoped to Quick Reorder only (not shared with any other section), so no
   other UI is affected. Mobile's own ≤640px override (12px) is untouched.
   Undo: restore mgk-retail.css.bak-20260811-quickreorder-row-gap-16px. */
.mgk-quickreorder__row { display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.mgk-quickreorder__row::-webkit-scrollbar { display: none; }
.mgk-quickreorder-card {
	box-sizing: border-box;
	/* Column 2 is `1fr`, not `auto`: it has to absorb the card's leftover width
	   so the "+" in it can sit against the card's right edge. With `auto auto`
	   plus justify-content:start the two tracks packed to the left and the grid
	   ended well short of the card, leaving the button mid-card. The row-2
	   thumb strip is column 1, so widening column 2 costs it nothing.
	   Rows: `auto 1fr` so row 2 takes the remaining height, letting the button's
	   align-self:end reach the bottom padding edge rather than the bottom of a
	   48px-tall content row. */
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr;
	/* 12px between the two rows (spec's card gap); the button is right-aligned in
	   its own track now, so column-gap is only a minimum separation from the
	   thumb strip rather than the thing that positions it. */
	row-gap: 12px; column-gap: 34px;
	/* 260px is the Figma width, held exactly: flex:none (no grow, no shrink)
	   keeps the card at its design size in the scroll strip instead of
	   compressing to fit the viewport. Overflowing the section is fine — and
	   intended — because the row scrolls. */
	flex: none;
	padding: 20px; width: 260px; min-width: 0; min-height: 126px;
	background: var(--mgk-surface); border: 1px solid var(--mgk-border);
	border-radius: 16px; transition: border-color .2s;
}
.mgk-quickreorder-card:hover { border-color: #1E3545; }
.mgk-quickreorder-card:hover .mgk-quickreorder-card__add { background: #0D3985; }
/* Order number: full-width first line (Body L/Bold — Quicksand 700 16/24). */
.mgk-quickreorder-card__body { grid-area: 1 / 1 / 2 / 3; display: flex; flex-direction: column; min-width: 0; }
/* Phone-only fields of the reorder card (mockup line 2375-2381): the LAST
   ORDERED date block, the "N items from this basket" line and the order total.
   The desktop card is the compact thumbs + round "+" row and carries none of
   them; § 309 turns all three on at ≤640px. */
.mgk-quickreorder-card__last { display: none; }
.mgk-quickreorder-card__items { display: none; }
.mgk-quickreorder-card__total { display: none; }
.mgk-quickreorder-card__name { font-family: 'Quicksand', var(--mgk-font); font-style: normal; font-weight: 700; font-size: 16px; line-height: 24px; color: #1B3A52; }
/* Thumbnail row (48px squares, 8px gap, 1px #D5E2EE, radius 10). Sits in row 2
   column 1 of the card grid, with the + button beside it in column 2 — the
   card's 34px column-gap is what separates them, so no padding is needed here.
   overflow:hidden so a card narrower than the full strip (below ~1200px, where
   four 260px cards no longer fit) crops the last thumb cleanly rather than
   overflowing the card. */
.mgk-quickreorder-card__media { grid-area: 2 / 1 / 3 / 2; display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 8px; min-width: 0; overflow: hidden; }
/* flex:none keeps the thumbs SQUARE at the Figma 48px. They must not shrink:
   with flex-shrink allowed they squeezed into narrow ovals on the sub-1200px
   cards (height stays 48 while width gives way). Below 1200px the card shrinks
   under its 260px, so the strip is clipped by the card's overflow instead —
   the visible thumbs stay the right shape. */
.mgk-quickreorder-card__thumb { box-sizing: border-box; width: 48px; height: 48px; border: 1px solid var(--mgk-border); border-radius: 10px; overflow: hidden; background: var(--mgk-ph-bg); flex: none; display: flex; align-items: center; justify-content: center; }
body .mgk-quickreorder-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-quickreorder-card__ph { font-size: 20px; }
/* Row 2, column 2 of the card grid, parked in that cell's BOTTOM-RIGHT corner:
   justify-self:end pushes it to the card's right padding edge and align-self:end
   to the bottom one, so it always sits 20px (the card's own padding) in from
   both — fixed regardless of thumb count, order-number length, or how far the
   card shrinks below 260px on a narrow desktop. Grid placement, not
   position:absolute, so it still occupies layout space and can never overlap
   the thumb strip. */
.mgk-quickreorder-card__add { grid-area: 2 / 2 / 3 / 3; align-self: end; justify-self: end; background: #1363FF; color: #fff; font-size: 12px; width: 24px; height: 24px; padding: 6px; border-radius: 18px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; border: none; cursor: pointer; transition: background .2s; }
.mgk-quickreorder-card__add:disabled { opacity: .6; cursor: default; }
/* Mobile: the strip is the same horizontal scroller as every other breakpoint;
   its card width / gap / scroll-snap are set by the later ≤640px block (search
   "mgk-quickreorder__row {" near the phone-skin section), which is the single
   owner of the phone card geometry — don't set width here, it would be
   overridden there anyway. This block only carries the thumbnail treatment:
   side-by-side squares become overlapping circles (mockup's stacked-thumbnail
   motif) — still up to 3 REAL per-order product images, never padded/repeated
   when an order has fewer than 3 (quick-reorder.php already only renders what
   mgk_past_orders() actually returns). */
@media (max-width: 640px) {
	.mgk-quickreorder-card__media { padding-left: 8px; }
	.mgk-quickreorder-card__thumb { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--mgk-surface); box-shadow: 0 2px 6px rgba(27,58,82,.12); }
	.mgk-quickreorder-card__thumb + .mgk-quickreorder-card__thumb { margin-left: -8px; }
}
/* Logged-out state (UI-html/home-mobie.svg "Sign in to see your previous
   groceries") — same card shell as .mgk-quickreorder-card, just one row
   of copy + a link instead of the product grid. */
.mgk-quickreorder__signin { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--mgk-surface); border: 1.5px solid var(--mgk-border); border-radius: 10px; padding: 16px; }
.mgk-quickreorder__signin-title { display: block; font-size: 14px; font-weight: 600; color: var(--mgk-navy-900); }
.mgk-quickreorder__signin-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--mgk-text-2); }
.mgk-quickreorder__signin-cta { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
	.mgk-quickreorder__signin { flex-direction: column; align-items: flex-start; }
}

/* ── 003 Trust Strip ───────────────────────────────────────── */
.mgk-trust { background: var(--mgk-surface); border-bottom: 1px solid var(--mgk-border); padding: 10px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mgk-trust__item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; }
.mgk-trust__text { font-size: 12px; font-weight: 600; }
.mgk-trust__item--halal   { background: var(--mgk-halal-bg); }   .mgk-trust__item--halal .mgk-trust__text   { color: var(--mgk-halal); }
.mgk-trust__item--sfa     { background: var(--mgk-sfa-bg); }     .mgk-trust__item--sfa .mgk-trust__text     { color: var(--mgk-sfa); }
.mgk-trust__item--organic { background: var(--mgk-organic-bg); } .mgk-trust__item--organic .mgk-trust__text { color: var(--mgk-organic); }
.mgk-trust__item--muted   { background: var(--mgk-bg-alt); }     .mgk-trust__item--muted .mgk-trust__text   { color: var(--mgk-text-2); }
.mgk-trust__item--teal    { background: var(--mgk-teal-bg); }    .mgk-trust__item--teal .mgk-trust__text    { color: var(--mgk-teal); }
.mgk-trust__item--green   { background: var(--mgk-green-bg); }   .mgk-trust__item--green .mgk-trust__text   { color: var(--mgk-green); }

/* ── 004 Category Grid ─────────────────────────────────────── */
/* Matches UI-html/home.svg + home.css (1440px reference frame, "Category"
   layer at ~y=7491 in home.css): a single row of icon+label items, no card
   border/background — just a 60px icon floating directly above a 12px/16px
   semibold label, 4px gap between them, 114px item width, 20px row gap.
   Always renders every shoppable category (no cap) — the CTA next to the
   heading always shows (see category-grid.php) and just links to the full
   Categories page. Row overflows into a horizontal scroll once categories
   exceed the section's width.
   Figma spec: this row is Height Hug 88px at the 1440 reference width —
   exactly the card height, no more. The hover-reveal scrollbar's 6px track
   used to be reserved via padding-bottom:4px (occupies box space even
   fully transparent), which pushed this row to 92px. padding-bottom is
   dropped to land on 88px, but the hover-reveal cue itself is intentionally
   kept (unlike .mgk-freshpicks__row / .mgk-fbt__grid, which hide theirs
   outright) — the accepted trade is that the 6px thumb can now sit slightly
   over the bottom of the card labels when it's showing (hover, or always-
   thin in Firefox) instead of never appearing at all.
   Undo: /tmp/mgk-retail-undo/.../mgk-retail.css.bak-20260811-catrow-restore-hover-scrollbar. */
.mgk-catrow { display: flex; gap: 20px; width: 100%; min-width: 0; overflow-x: auto; padding-bottom: 0; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.mgk-catrow:hover { scrollbar-color: var(--mgk-border) transparent; }
.mgk-catrow::-webkit-scrollbar { height: 6px; }
.mgk-catrow::-webkit-scrollbar-track { background: transparent; }
.mgk-catrow::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.mgk-catrow:hover::-webkit-scrollbar-thumb { background: var(--mgk-border); }
/* Figma spec: card is exactly 114×88px at the 1440 reference width. Width
   already matched (114px, fixed rather than Hug but same number); height
   didn't because .mgk-cat-card__name had no line cap, so a long category
   name (real data runs longer than Figma's short mock names, e.g. "Premium
   Beef Package 5" vs "Beef & Veal") wraps to 2 lines and pushes the card to
   ~95px. Clamping the name to 1 line + fixing the card height removes that
   variance regardless of which categories are configured.
   Undo: /tmp/mgk-retail-undo/.../mgk-retail.css.bak-20260811-catcard-fixed-88px. */
.mgk-cat-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; flex: 0 0 auto; width: 114px; height: 88px; }
.mgk-cat-card__media { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; transition: transform .3s; }
.mgk-cat-card:hover .mgk-cat-card__media { transform: scale(1.05); }
.mgk-cat-card__icon { font-size: 40px; line-height: 1; }
.mgk-cat-card__icon img, .mgk-coltabs__icon img, .mgk-catmenu__icon img { width: 1em; height: 1em; object-fit: contain; display: block; }
.mgk-cat-card__img--ph { display: block; width: 100%; height: 100%; border-radius: 12px; background: linear-gradient(135deg, var(--mgk-bg-alt), var(--mgk-border)); }
.mgk-cat-card__name { display: block; color: var(--mgk-text-dark); font-weight: 600; font-size: 12px; line-height: 1.3; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
	.mgk-catrow { gap: 12px; }
	.mgk-cat-card { width: 88px; }
	.mgk-cat-card__media { width: 48px; height: 48px; }
	.mgk-cat-card__icon { font-size: 32px; }
}

/* ── 005 Featured Products ─────────────────────────────────── */
/* ProdCard — matches the Figma spec (Quicksand, same as the rest of the site). Structure stays responsive (fluid width via the grid's fr columns) — only color/spacing/type come from the spec, not the fixed 260×376 frame size. */
.mgk-prod { box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; background: #FFFFFF; border: 1px solid #F2F3F5; border-radius: 12px; overflow: hidden; text-decoration: none; transition: box-shadow .2s, border-color .2s; font-family: 'Quicksand', var(--mgk-font); align-self: start; }
.mgk-prod:hover { box-shadow: var(--mgk-shadow-lg); border-color: #1E3545; }
/* Two distinct hover states, not one. The card's stroke reacts to a hover
   anywhere inside it (including over the button — the button sits within the
   card, so :hover on the card still applies and the stroke stays lit). The
   button only darkens when the pointer is actually on the button: it is keyed
   off the button's OWN :hover, never the card's. The old rule here was
   `.mgk-prod:hover .mgk-prod__add`, which repainted the button from anywhere
   on the card and made the two states indistinguishable. */
.mgk-prod .mgk-prod__add:hover, .mgk-prod .mgk-prod__add-wide:hover { background: #0D3985; }
.mgk-prod__media { position: relative; aspect-ratio: 16 / 11; background: #EBF0F6; overflow: hidden; }
/* Home's full-bleed product rows (Featured, Trending) and Reviews override
   .mgk-grid--N's fixed column count with the same one-row auto-fit rule the
   Flash strip uses. Scoped to .mgk-products/.mgk-reviews on purpose:
   .mgk-grid--N is shared with 15 other templates (shop, profile, vouchers...)
   that still want fixed columns. 256px matches the Flash card so both rows stay
   in step, and the media swaps its fixed 176px for the 16/11 design ratio so a
   wider card keeps its photo in proportion instead of going squat.

   A min(400px, 100%) track MAX was tried here and reverted: capping the track
   pins every card to 400px and strands the rest as one gap (only 2 cards showed
   at 1280px).

   auto-fill, not auto-fit: auto-fit COLLAPSES empty tracks, so a short row
   (e.g. 1-2 Fresh Picks) gets only as many tracks as it has cards and each
   one stretches to fill the row — the same stretch bug fixed for
   .mgk-shop/.mgk-freshpicks below (see the note there, ~line 654). auto-fill
   keeps every track minmax(256px, 1fr) would give a full row and leaves
   unused ones as blank space after the last card, so card size stays fixed
   regardless of item count while the column count still tracks viewport
   width. */
.mgk-products .mgk-grid,
.mgk-reviews .mgk-grid { grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); overflow: hidden; }
.mgk-products .mgk-prod__media { height: auto; aspect-ratio: 16 / 11; min-height: 132px; }
/* Today's Fresh Picks (Featured Products on Home) is the one exception to the
   one-row rule above — DESKTOP ONLY (≥641px, matching mgkDesktopMq in
   mgk-retail.js): it wraps to a second row instead of hiding whatever
   doesn't fit a single row. Mobile keeps the original single-row behaviour
   unchanged, same as Trending Products. The "hide past N cards" enforcement
   itself lives in JS (mgkFitOneRow() in mgk-retail.js, via
   MGK_ONEROW_WRAP_SELECTOR), because the column count is only known after
   layout — an explicit grid-template-rows/max-height attempt here was
   reverted for the same reason auto-fit's column count can't be predicted in
   CSS alone. This rule only needs to stop CLIPPING the second row once JS
   keeps cards in it: overflow:hidden above still exists for the single-row
   grids' trailing partial-track spillover, but Featured Products' own
   second row must not be cut off by it. */
@media (min-width: 641px) {
	[data-widget_type="mgk_featured_products.default"] .mgk-products .mgk-grid {
		overflow: visible;
	}

	/* PDP "Similar products" ONLY (body:has(.mgk-pdp), same scope as the
	   <=640px block further down): one row, swipe/scroll sideways with the
	   prev/next arrows, instead of Home's wrap-to-2-rows + "View all". Card
	   SIZE must still match Home exactly, so this keeps the base rule's own
	   256px design width (grid-auto-columns instead of grid-template-columns)
	   rather than a fixed N-per-row basis, which would size cards differently
	   from Home the moment the viewport doesn't divide evenly by N.

	   Fixed 256px, not minmax(256px, 1fr): with grid-auto-flow: column, `1fr`
	   is a share of the SCROLL CONTENT width, not the row — a short list (1-2
	   Similar products) has nothing to size against but the container, so
	   each `1fr` column stretched to fill it, same stretch bug as Home's
	   auto-fit before that was fixed (~line 570). A bare 256px keeps every
	   card the same size regardless of how many there are; overflow-x still
	   kicks in once enough cards no longer fit the row.
	   Staying `display: grid` (not flex) matters for mgkFitOneRow() in
	   mgk-retail.js: MGK_ONEROW_WRAP_SELECTOR still matches this container, so
	   without `overflow-x: auto` letting every column escape the row, its
	   "keep cols * 2 rows' worth" truncation could clip cards a flex row
	   wouldn't need protecting against — auto-columns keeps every card in ONE
	   row (never wraps), so cols == the visible count and nothing gets hidden. */
	body:has(.mgk-pdp) .mgk-products .mgk-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 256px;
		gap: 16px;
		overflow-x: auto; overflow-y: hidden;
		scroll-behavior: smooth; scroll-snap-type: x proximity;
		scrollbar-width: none; -ms-overflow-style: none;
	}
	body:has(.mgk-pdp) .mgk-products .mgk-grid::-webkit-scrollbar { display: none; }
	body:has(.mgk-pdp) .mgk-products .mgk-grid .mgk-prod { scroll-snap-align: start; }
	body:has(.mgk-pdp) .mgk-products .mgk-sh__sub,
	body:has(.mgk-pdp) .mgk-products .mgk-products__cta { display: none; }
	body:has(.mgk-pdp) .mgk-products .mgk-products__arrows { display: flex; flex: 0 0 auto; }
}

/* Same two fixes for the off-home product sections now that they are full-bleed
   (see .mgk-section.mgk-shop / .mgk-freshpicks below). Both scoped by SECTION,
   never on .mgk-grid--N itself, which 15 other templates still want fixed.

   1. TRACKS: .mgk-grid--5's five hard columns turned every extra pixel of a
      wide viewport into wider cards — measured 266px @1440 -> 362 @1920 ->
      490 @2560. auto-fit spends it on more columns instead, holding cards near
      the 266px design width. Unlike Home this grid is ALLOWED to wrap: it is
      the paginated catalog (25 products over 5 rows), so there is no one-row
      clipping here and nothing is hidden — see the note at .mgk-section.mgk-shop.
      The <=1024px and <=720px blocks restate this at the same (0,2,0) so their
      3-col / 2-col layouts are not overridden by this selector.
      256px (not 266) is Home's floor: a Category/Search card must measure the
      same as a Home product card, so the track minimum has to be identical.
   2. MEDIA: 16/11, the same ratio as .mgk-products .mgk-prod__media and
      .mgk-flashcard__media, so the photo well is the same SHAPE site-wide.
      With height:176px fixed, a 490px card flattened it to ratio 2.77.

   .mgk-freshpicks keeps its flex scroller (arrows + overflow-x); only its
   card media needs the ratio fix, not the track rule.

   auto-FILL, not auto-fit (Home/.mgk-products above uses auto-fit — this is
   the one deliberate difference between the two, everything else about the
   track function is identical on purpose). Two other approaches were tried
   and reverted first:
     - repeat(5, 1fr) (a hard 5-up grid) fixes the few-results case but
       reintroduces the exact problem #1 above describes — on a 1920/2560px
       viewport each of the 5 tracks would inflate to 362/490px and badly
       distort the product photo.
     - minmax(256px, 266px) (a hard track MAX, still with auto-fit) looked
       right but breaks the column COUNT: auto-fit sizes columns off the
       track's max, and 5 × 266px + 4 × 16px gap (1394px) is 2px wider than
       this row's actual 1392px, so auto-fit silently dropped to 4 columns
       instead of 5.
     - Capping .mgk-prod's own max-width (leaving the track function as
       auto-fit + minmax(256px, 1fr)) fixed the single-card-stretch case but
       NOT the general one: auto-fit COLLAPSES empty tracks, so 2 results in
       a row that fits 5 still only get 2 tracks — each ~688px wide — and a
       266px-capped card left-aligned in a 688px track left a ~400px gap
       before the next card instead of the usual 16px. Only a full 5/5 row
       (nothing to collapse) ever looked right.
   auto-fill is the actual fix: unlike auto-fit it does NOT collapse tracks
   with no card in them — it keeps all 5 (at whatever width minmax(256px,
   1fr) would have given a full row, ~265.6px @1440 design width, same math
   as Home) and simply leaves the unused ones as blank space after the last
   card. So 1 or 2 results sit at the normal ~266px card width, immediately
   next to each other with the standard 16px gap, in flush-left tracks —
   while a full row (or a very wide viewport spawning extra columns) is
   pixel-identical to the old auto-fit behaviour, because every track is
   occupied and there is nothing left to collapse either way. */
.mgk-shop .mgk-grid { grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); padding: 0 24px; }
.mgk-shop .mgk-prod__media,
.mgk-freshpicks .mgk-prod__media { height: auto; aspect-ratio: 16 / 11; min-height: 132px; }

/* Surplus cards hidden by mgkFitOneRow(); [hidden] must beat each card's own
   display value, same reason as .mgk-flashcard[hidden]. */
.mgk-prod[hidden], .mgk-quickreorder-card[hidden], .mgk-review[hidden] { display: none; }
/* scale(1.06) baseline pushes each edge ~3% outside the frame so overflow:hidden
   crops away edge artifacts baked into inconsistent admin-uploaded source photos
   (e.g. screenshot borders, rounded-corner mattes) without touching image files. */
body .mgk-prod__media img.mgk-prod__img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s; transform: scale(1.06); }
.mgk-prod:hover .mgk-prod__img { transform: scale(1.11); }
.mgk-prod__img--ph { display: flex; align-items: center; justify-content: center; font-size: 48px; }
/* ui-retail home.svg: cert chip row lives in the card body (below the image,
   above the name), a horizontal row — not overlaid on the photo. Fixed
   min-height (rendered even when empty, see prod-card.php) keeps the name/
   price/CTA of every card in a row aligned regardless of whether that
   product happens to have any cert badge. */
.mgk-prod__badges { display: flex; flex-wrap: nowrap; gap: 4px; height: 24px; overflow: hidden; }
.mgk-prod__badges .mgk-chip { display: inline-block; max-width: calc(33.33% - 3px); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Non-cert chips in this row keep the old compact sizing; the cert chips
   (halal/organic/sfa) are excluded so the Chip/Halal spec above — 24px tall,
   4px/10px, 12/16 — is what actually applies on the card. Without :not() this
   more-specific rule would silently win and shrink them back to 10px. */
.mgk-prod__badges .mgk-chip:not(.mgk-chip--halal):not(.mgk-chip--organic):not(.mgk-chip--sfa) { padding: 2px 8px; font-size: 10px; }
/* Corner badges — MANDATORY CONVENTION, same rule site-wide (see
   .mgk-sale__deal-tag/-ribbon and .mgk-flashcard__pct/__ribbon):
     top-left  = the sale PERCENTAGE ("-18%") ONLY, at EVERY viewport
     top-right = the Best Seller ribbon ONLY
   never a cert badge in either corner. Cert badges live below the image in
   .mgk-prod__badges. Each corner is reserved by SIDE, not by which badge a
   given product happens to have: a card with only one of the two leaves the
   other corner empty rather than moving its badge across, so the position of a
   badge alone tells the shopper which kind it is.
   The left chip is a PERCENTAGE and never the absolute "SAVE $X". A percentage
   is comparable between products (a dollar figure only means something if you
   already know both regular prices) and fits the narrowest card. This is the
   same figure .mgk-flashcard__pct has always shown; .mgk-prod__pct was the one
   outlier and now matches. mgk_product_card()'s 'save_amount' still exists for
   the PDP price block — it is just never this chip. */
.mgk-prod__pct { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; justify-content: center; background: var(--mgk-red); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
/* Tag/BestSeller — Figma spec: 70×26 box (62px label + 4px padding either
   side), Quicksand Bold 12/16, notched bottom-left corner only. box-sizing is
   border-box here, so 70×26 is the outer size padding sits inside of. z-index
   keeps it above .mgk-prod__img. The tag is only ever the literal
   'Best Seller' (mgk-woo.php: is_featured() ? 'Best Seller' : ''), so the
   fixed width has no longer label to clip.

   SINGLE SOURCE OF TRUTH for the Best Seller badge in every section. The card
   families don't share markup — Featured/Trending/Shop use .mgk-prod__tag,
   home Flash Deals uses .mgk-flashcard__ribbon — but both render the same
   literal "Best Seller" string and must look identical, so both selectors sit
   on this one rule instead of drifting apart with their own sizes.
   Per-section positioning (the ribbon families sat at top/right:8px) is
   normalised to the flush 0,0 corner the badge convention calls for.
   The Sale page's grid deals now share this same look via shared/prod-card.php
   (.mgk-prod__tag) instead of their own .mgk-sale__deal-ribbon — that class no
   longer appears in markup; only .mgk-sale__herodeal-* (the untouched Hero
   Deal) still has its own classes, styled separately above. */
.mgk-prod__tag,
.mgk-flashcard__ribbon {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 70px;
	height: 26px;
	padding: 4px;
	background: #E85040;
	border-radius: 4px 4px 0 4px;
	font-family: 'Quicksand', var(--mgk-font);
	font-style: normal;
	font-weight: 700;
	font-size: 12px;
	line-height: 16px;
	color: #FFFFFF;
}
.mgk-prod__oos { position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
/* Same overlay as .mgk-prod__oos above, reused on the Flash Deals card
   families (home/flash-deals.php, pages/sale.php) which don't share
   .mgk-prod markup. */
.mgk-flashcard__oos, .mgk-sale__herodeal-oos { position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
/* Merchant-uploaded Sale Campaign tag (mgk_product_sale_tag_image()) — the
   banner strip along the bottom of the product photo.
   SIZING RULE, shared verbatim by all four card families (.mgk-prod__saletag,
   .mgk-flashcard__saletag, .mgk-sale__deal-saletag,
   .mgk-sale__herodeal-saletag) via the --mgk-saletag-* vars below:
   the tag spans the image's FULL width (inset 0, no side gutters) and stands
   a FIXED pixel height — not a percentage, and not the artwork's own ratio.
   Both alternatives were tried and both drift:
     - top/bottom percentage band (the original top:77.5%;bottom:4.5%) resolves
       against media heights from 260px (sale hero) down to 96px (mobile
       Products rail), so the same banner rendered ~47px tall in one section
       and ~17px in another; object-fit:contain then letterboxed the wide
       artwork inside that short band until the text was clipped/illegible.
     - height:auto (ratio-driven) instead tracks card WIDTH, so the wider Shop
       grid card rendered the banner 70px tall against Featured Products' 56px.
   A fixed height plus object-fit:cover is the only form that reads identically
   in every section: the strip is the same thickness everywhere, and a wider
   card just reveals more of the artwork rather than scaling it up.
   WHY THE FIXED HEIGHT IS NOW A RATIO INSTEAD: the two failures above are both
   about the strip's height being derived from the WRONG thing (the media box's
   height, or the card's width in isolation). A fixed 40px fixed that, but it
   also fixed the strip's box ratio at 260/40 = 6.5 while the artwork itself is
   4.69 (253x54, measured off the live upload). object-fit:cover has to scale the
   image until it covers the taller dimension, so filling 260px of width made it
   55px tall inside a 40px box and clipped ~28% of its height — evenly off the
   top and bottom. On this artwork (a rounded three-part pill: FREESHIP / 9.9
   FRESH SALE / VOUCHER) that crop flattened the pill's rounded ends and shaved
   both lines of text.
   aspect-ratio keeps everything the fixed height won — the box ratio is CONSTANT
   at every card width and in every section, so the strip still reads identically
   site-wide and the merchant's pixel dimensions still can't influence it — but
   sets that constant to the artwork's own ratio, which is the one value at which
   cover has nothing left to crop. Thickness now tracks card width proportionally
   (56px on a 264px card, 41px on a 195px one) instead of staying a hard 40px;
   that is the cost of showing the whole banner, and it is proportional rather
   than arbitrary, so it never looks wrong at any one width.
   --mgk-saletag-ratio, not a hardcoded number, so the phone override below can
   retune it in one place. It stays paired with MGK_SALE_TAG_RATIO and
   mgk_sale_tag_ratio_warning() in inc/mgk-merchant-sale-admin.php, which warns
   the merchant at upload time when their artwork is far off this strip shape.
   The rules live on this plain <span> wrapper rather than the <img> because
   percentage/auto height on a replaced element resolves against its OWN
   intrinsic ratio, not the containing block. */
.mgk-prod__saletag,
.mgk-flashcard__saletag,
.mgk-sale__deal-saletag,
.mgk-sale__herodeal-saletag {
	position: absolute; left: 0; right: 0; bottom: 0;
	/* Height comes from the strip's own width via this ratio, matching the
	   artwork so nothing is cropped. min/max are released to auto BECAUSE they
	   would override the ratio: they used to be pinned alongside `height` to stop
	   a percentage cap or a flex/grid parent shrinking the strip (an earlier
	   `max-height: 50%` cut it to 30px on short media boxes). aspect-ratio is not
	   vulnerable that way — it derives height from a width this element already
	   controls via left/right:0 — so the pins are no longer load-bearing. */
	aspect-ratio: var(--mgk-saletag-ratio, 4.69);
	height: auto;
	min-height: 0;
	max-height: none;
	line-height: 0;
	/* Belt-and-braces: the media box already clips, but if this strip is ever
	   reused somewhere without overflow:hidden, crop here too. */
	overflow: hidden;
}
/* `body` prefix, same as the sibling __media img rules: Elementor ships
   `.elementor img { height: auto }` at equal specificity and later source
   order, which otherwise wins and lets the banner size itself from its own
   intrinsic height instead of filling the wrapper's ratio-derived box. */
body .mgk-prod__saletag img,
body .mgk-flashcard__saletag img,
body .mgk-sale__deal-saletag img,
body .mgk-sale__herodeal-saletag img {
	display: block; width: 100%; height: 100%;
	/* `contain`, not `cover`, is what actually guarantees the whole banner is
	   visible. With the wrapper now on the artwork's own ratio the two are
	   equivalent for THIS upload — there is no overflow for cover to crop — but
	   they diverge the moment a merchant uploads something a different shape:
	   cover would silently slice it again, contain fits it whole and letterboxes
	   the remainder. The old shrink-to-fit bug that made contain unusable came
	   from the wrapper being far off-ratio (a 6.5 box holding 4.69 artwork);
	   letterboxing inside a correctly-proportioned box is not visible. Showing
	   the full image is the requirement here, so contain is the correct default
	   and mgk_sale_tag_ratio_warning() still nudges merchants toward ~4.7. */
	object-fit: contain; object-position: center;
}
/* Sale page's Hero Deal (the one large first card) is the sole exception to
   the shared saletag rule above — desktop hides it (grid cards below still
   show theirs), mobile keeps it. min-width pairs with the .mgk-sale__mhero
   "MOBILE ONLY" split already used on this same page. */
@media (min-width: 641px) {
	.mgk-sale__herodeal-saletag { display: none; }
}
.mgk-prod__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.mgk-prod__name { font-family: var(--mgk-font); font-size: 14px; font-weight: 600; line-height: 1.15; margin: 0; min-height: 1.15em; color: #1B3A52; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgk-prod__foot { display: flex; align-items: center; justify-content: space-between; }
.mgk-prod__price { color: #061937; font-weight: 700; font-size: 22px; }
.mgk-prod__price--sale { color: #C5342A; font-weight: 800; }
.mgk-prod__unit { color: var(--mgk-text-3); font-size: 12px; font-weight: 400; margin-left: 4px; }
.mgk-prod__was { color: #8A9FB5; font-size: 13px; font-weight: 400; text-decoration: line-through; margin-left: 8px; }
.mgk-sale-strip { margin: 0 0 28px; padding: 20px; background: linear-gradient(135deg, #fff5f5, #ffffff); border: 1px solid #f3d0d0; border-radius: 14px; }
.mgk-sale-strip__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.mgk-sale-strip__title { font-size: 20px; font-weight: 800; color: var(--mgk-navy-900); margin: 0; }
.mgk-sale-strip__badge { background: var(--mgk-red); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 12px; border-radius: 20px; }
.mgk-prod__add { background: #1363FF; color: #fff; font-size: 16px; font-weight: 400; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; transition: background .2s; }
.mgk-prod__actions { display: inline-flex; align-items: center; gap: 6px; }
.mgk-prod__wish { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text-3); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; padding: 0; line-height: 1; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.mgk-prod__wish:hover { color: var(--mgk-wish-remove); border-color: var(--mgk-wish-remove); }
.mgk-prod__wish.is-active { color: var(--mgk-wish-remove); border-color: var(--mgk-wish-remove); background: var(--mgk-red-bg); }
.mgk-prod__options { display: block; width: 100%; min-height: 16px; margin-top: -4px; padding: 1px 8px; background: #ECF2FD; color: rgba(27,58,82,.75); font-size: 10.5px; font-weight: 600; border-radius: 8px; box-sizing: border-box; }
.mgk-prod__wish-wide { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: auto; padding: 10px 0; background: var(--mgk-red-bg); color: var(--mgk-red); font-size: 13px; font-weight: 700; border-radius: 10px; cursor: pointer; text-align: center; }
.mgk-prod__wish-wide:hover { background: var(--mgk-red); color: #fff; }
.mgk-prod__add-wide { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: auto; padding: 10px 0; background: #1363FF; color: #fff; font-size: 14px; font-weight: 700; border-radius: 10px; cursor: pointer; text-align: center; transition: background .2s; }
.mgk-prod .mgk-chip { font-family: 'Quicksand', var(--mgk-font); }

/* ── Trust Marquee (home.svg) ──────────────────────────────── */
.mgk-marquee { background: var(--mgk-navy-900); overflow: hidden; white-space: nowrap; padding: 10px 0; }
.mgk-marquee__track { display: inline-flex; animation: mgk-marquee-scroll 28s linear infinite; }
.mgk-marquee__item { color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 0 14px; }
.mgk-marquee__sep { color: rgba(255,255,255,.4); }
@keyframes mgk-marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mgk-marquee__track { animation: none; } }

/* ── Flash Deals (home.svg) ─────────────────────────────────── */
/* PREVIEW of the new desktop container rule: drop the --mgk-maxw column and
   let the section run the full viewport width with a hard 24px side padding
   (--mgk-pad-x, which is already 24px). Scoped to this one section for now so
   the rest of Home keeps the old centred column until the approach is signed
   off; when it is, this becomes the .mgk-section base rule site-wide. */
.mgk-section.mgk-flashwrap,
.mgk-section.mgk-quickreorder,
.mgk-section.mgk-promo,
.mgk-section.mgk-category,
.mgk-section.mgk-products,
.mgk-section.mgk-reviews { max-width: none; margin: 0; padding-left: 24px; padding-right: 24px; }
/* Figma spec: at the 1440 reference width these "card" sections should sit
   32px in from each edge (1440 - 2×32 = 1376 content width) — this rule's
   own 24px above only accounts for 24 of that 32. The other 8px is supposed
   to come from the Elementor container each section is wrapped in, but that
   container's default padding is 10px, not 8px, so every section here was
   landing 2px short PER SIDE (4px total) — e.g. Flash Deals' box measured
   1372px instead of 1376px.
   Fixed by trimming that wrapper padding from 10px to 8px, scoped two ways
   so nothing outside Home's own boxed sections is touched: `.elementor-878`
   limits it to this one page (the Home page's post ID), and `:has(...)`
   requires the wrapper to contain one of these exact sections — no
   Elementor auto-generated per-element ID needed (those regenerate if a
   section is ever rebuilt in the Elementor editor, silently breaking an
   ID-based rule). Hero and the appliance banner are deliberately NOT
   listed: both are edge-to-edge/full-bleed by design (see their own
   `padding: 0` rules), so widening their wrapper would widen THEM, which
   is not part of this fix.
   Undo: restore mgk-retail.css.bak-20260811-home-container-1376. */
.elementor-878 > .elementor-element.e-con-full:has(.mgk-flashwrap, .mgk-quickreorder, .mgk-promo, .mgk-category, .mgk-products, .mgk-reviews) {
	padding-left: 8px;
	padding-right: 8px;
}

/* Home desktop: these 6 "card" sections used to carry the shared 32px
   top/bottom .mgk-section padding, which stacked into a 64px gap between
   any two of them (32 + 32, both invisible whitespace with no visual
   anchor) — nobody could tell by eye whether that was 64px or 48px or 80px.
   Replaced with an explicit, self-documenting model: zero top/bottom
   padding on every card section, and a flat 24px margin-bottom instead. A
   margin (not the parent's flex `gap`) is used because .elementor is
   `display:block` on desktop — these sections are each their own top-level
   Elementor container (.e-con), not flex siblings, so there is no shared
   flex parent to hang a `gap` on. Desktop-authored order (see
   _elementor_data on the front page): Header → Hero → Marquee → Flash
   Deals → Quick Reorder → Promo → Category → Featured Products →
   Appliance Banner → Trending → Footer. Header/Hero/Marquee/Appliance
   Banner are deliberately flush against their neighbours (0 padding, no
   margin) and stay that way — only gaps INTO OR BETWEEN the 6 card
   sections below get the 24px treatment; Featured Products' margin-bottom
   still applies even though Appliance Banner (flush on its own top edge)
   follows it, and same for Trending Products before Footer.
   Verified with Playwright boundingClientRect against each section's own
   visible border/background (not inner text or buttons, which sit inside
   further padding and undercount the true edge — this bit twice while
   tuning the previous margin-offset version of this rule) — see
   scratchpad verify/ scripts from that pass for the measuring approach.
   Mobile (≤640px) reflows this order entirely (see the flex `order:` block
   below) and already has its own spacing rules, so this whole block is
   scoped to ≥641px to avoid fighting that layout. Featured Products and
   Trending Products share the .mgk-products class but only Featured
   Products sits after Category here — Trending Products' predecessor is
   the zero-padding Appliance Banner — so each is targeted by its widget's
   data-widget_type instead of the shared class. .mgk-footer is the shared
   sitewide footer (every page's get_footer()), not Home-only like the
   other 5 — its margin-bottom-style spacing is instead handled by
   overriding its own margin-top (see its base rule ~line 1046), scoped to
   body.home / .page-template-front-page so Shop/PDP/Account footers keep
   their normal 32px margin-top. */
/* Widgets like Quick Reorder can render nothing at all (see quick-reorder.php:
   `if ( ! is_user_logged_in() ) return;`, no fallback markup) — when that
   happens PHP's early `return` means even the widget's own wrapper div never
   prints, but Elementor's .e-con wrapper AROUND it always does, leaving an
   empty container that isn't 0-height (a stray ~40px of Elementor-default
   layout space, nothing set in this file). `.e-con:empty` doesn't catch it —
   Elementor's template leaves whitespace text nodes inside even when no
   widget rendered, and :empty excludes any element with text-node children,
   whitespace included. Targeting ":not(:has(*))" instead — zero ELEMENT
   children, ignoring whitespace-only text nodes — is what actually matches.
   Left alone, that phantom gap sat between two otherwise-adjacent sections
   and silently doubled the 24px gap below to ~44-64px depending on state.
   !important is load-bearing here, not stylistic: Elementor's own .e-con
   rule (frontend.css) declares `display: var(--display)` with no
   --display value set on this element, which resolves to CSS's `inline`
   initial value rather than falling through to a later rule — an unset
   var() makes the whole declaration valid-at-parse-time but invalid at
   compute-time, and the property still resets to its initial value instead
   of behaving as if the declaration were absent. A plain `display: none`
   here loses to that on cascade order regardless of selector specificity. */
.e-con:not(:has(*)) { display: none !important; }

@media (min-width: 641px) {
	/* Home desktop, whole-page rule: every section's own vertical padding is
	   zeroed and replaced with a single flat 24px gap to the next section —
	   EXCEPT Header-to-Hero, which stays flush at 0px (Hero sits directly
	   under the fixed header bar with no breathing room, by design).
	   Two hidden sources of space had to be neutralized for a flat 24px (or
	   0px) to actually be what renders, both invisible until measured with
	   Playwright boundingClientRect — visually you cannot tell 24px from
	   44px or 64px of blank space, so guessing here silently produces the
	   wrong number:
	   1) Every Elementor top-level container (.e-con, one per widget, the
	      PARENT of the [data-widget_type] element one level down) carries
	      its own 10px top/bottom padding by default.
	   2) .e-con also renders as `display:inline` whenever its --display
	      custom property isn't set (never is, here) — an inline box around
	      a block-level child (.mgk-section, .mgk-header, etc.) picks up
	      inline-formatting-context spacing (baseline/line-height) worth
	      another ~10px a side on top of (1).
	   Zeroing padding and forcing display:block on every .e-con removes
	   both, so each section's own box is the only thing contributing
	   height, and the margin-bottom below is the ONLY gap-producing rule
	   left — nothing hidden left to silently add to it. */
	.elementor .e-con { padding-top: 0; padding-bottom: 0; display: block; }

	/* One rule per section: zero its own vertical padding, set 24px
	   margin-bottom to the next section. Header is the sole exception
	   (0px, staying flush under itself to Hero) and Footer has no
	   margin-bottom (nothing follows it on the page). Selectors target
	   each widget's OWN content element — .mgk-section for the 7 "card"
	   widgets, .e-con for Header (.mgk-header is `position:fixed` and
	   contributes no box to the document flow, so the margin has to live
	   on its .e-con instead to actually push Hero down).
	   Hero used to be its own flush-with-Marquee special case (0px, not
	   24px) — Marquee sat directly under it and both were meant to read as
	   one banner+ticker unit. Marquee widget was removed from Home
	   entirely, so Hero now joins this list instead: without a 24px gap
	   here, Flash Deals (next section down) renders touching Hero's
	   bottom edge with 0px between them. */
	.e-con:has([data-widget_type="mgk_header.default"]) { margin-bottom: 0; }
	/* .mgk-section.mgk-abanner has its own `margin: 0` rule elsewhere in this
	   file at the SAME specificity (0,2,0) — it sits further down the file
	   (line ~917, outside any media query) so it wins on source order
	   regardless of what's written here. !important on margin-bottom only
	   (not the whole rule) settles it outright, independent of where that
	   rule ends up moving in the file later. */
	.mgk-section.mgk-hero,
	.mgk-section.mgk-flashwrap,
	.mgk-section.mgk-quickreorder,
	.mgk-section.mgk-promo,
	.mgk-section.mgk-category,
	[data-widget_type="mgk_featured_products.default"] .mgk-section.mgk-products,
	.mgk-section.mgk-abanner,
	[data-widget_type="mgk_trending_products.default"] .mgk-section.mgk-products {
		padding-top: 0;
		padding-bottom: 0;
		margin-bottom: 24px !important;
	}
	/* .mgk-footer carries its own margin-top:32px (base rule ~line 1046)
	   which would collapse with a margin-bottom set here (adjacent block
	   margins take the max, not the sum) rather than adding to it — so
	   Trending Products' 24px above only actually renders as 24px once
	   .mgk-footer's own margin-top is neutralized for Home specifically
	   (Shop/PDP/Account keep their normal 32px, hence the body.home /
	   .page-template-front-page scoping). */
	body.home .mgk-footer,
	body.page-template-front-page .mgk-footer { margin-top: 0; }
}

/* Same full-bleed treatment for the OFF-HOME sections that were still holding
   the centred --mgk-maxw column. The trigger is alignment, not taste: several
   of these pages already carry a full-bleed .mgk-products row (Fresh Deal, PDP,
   Search Results), so at >1440px the maxw section above it sat inset 240px per
   side while the row below ran edge-to-edge — a visible step in the left margin
   down the page. Measured before the change at 1920px: .mgk-hampers L=240/R=240
   directly above .mgk-products L=0/R=0.

   All of these are ROW CARD / content sections, so they take the 24px side pad,
   not the banner's padding: 0. (.mgk-hero and .mgk-abanner are the flat-banner
   cases and are handled separately above.)

   What is deliberately NOT applied here: the one-row auto-fit rule that Home's
   .mgk-flashwrap__grid uses. Home's strips are teasers with a "View all" link,
   so clipping the surplus costs nothing. These are not:
   - .mgk-shop is the paginated catalog — 20-25 products over 4-5 rows. Forcing
     one row would [hidden] 15-20 of them with no other route to reach them.
   - .mgk-seasonal / .mgk-seasoncamp / .mgk-pdp wrap on purpose too.
   - .mgk-freshpicks__row is a horizontal SCROLLER with arrow buttons (see its
     overflow-x rule): every card stays reachable by swiping, so there is no
     surplus to clip and the arrows would be orphaned.
   None of them are in MGK_ONEROW (mgk-retail.js) and none should be. */
.mgk-section.mgk-hampers,
.mgk-section.mgk-freshpicks,
.mgk-section.mgk-shop,
.mgk-section.mgk-seasonal,
.mgk-section.mgk-seasoncamp,
.mgk-section.mgk-pdp { max-width: none; margin: 0; padding-left: 24px; padding-right: 24px; }

/* Unlike the lead hero, this supporting banner is an inset rounded card, as in
   the supplied Home reference. Fluid margin/radius keep the same silhouette
   from laptop through wide desktop. */
.mgk-section.mgk-abanner {
	max-width: none; margin: clamp(12px, 1.1vw, 20px); padding: 0;
	border-radius: clamp(18px, 1.6vw, 28px);
}
/* Figma spec: box padding is 22/24/24/24 — bottom had drifted to 48px with no
   comment explaining why; no element inside depends on the extra 24px (the
   "View all" link isn't absolutely positioned), so this just restores spec.
   Undo: restore mgk-retail.css.bak-20260811-flashdeals-5col-and-padding. */
/* border:1.5px renders as a rounded-down 1px line in Chromium (confirmed by
   pixel measurement) — box-shadow isn't snapped to integer px the same way,
   so it's the only way to actually get a visible 1.5px line. inset keeps it
   from taking any layout space (border did, via box-sizing:border-box), and
   it still follows the 20px corner radius. Mobile's full-bleed override below
   must clear this too (box-shadow:none), since border:0 there doesn't cancel
   a box-shadow set here. Undo: restore mgk-retail.css.bak-20260811-flashwrap-box-border-boxshadow. */
/* No horizontal padding here (moved to .mgk-flashwrap__head below) — this
   box's own 24px side padding used to sit on top of the 24px section
   padding, giving .mgk-flashwrap__grid ~48px less width than
   .mgk-products/.mgk-shop's grids at the same viewport, which silently
   changed the auto-fill COLUMN COUNT (not just card width) at several
   breakpoints. Keeping the header inset via its own padding instead means
   the grid now sees the exact same available width as those other
   sections, so both compute identical columns/card widths everywhere. */
.mgk-flashwrap__box { background: rgba(247,243,236,.92); box-shadow: inset 0 0 0 1.5px #FDD18A; border-radius: 20px; padding: 22px 0 24px; }
/* Figma's "Width: Fill (1328px)" means fill-container, not a literal 1328 —
   1328 is only the resolved value AT the 1440 reference frame. A prior fix
   pinned width:1328px literally, which matched at exactly 1440px but broke
   every wider viewport: .mgk-flashwrap__grid below stretches with the box
   (auto-fit), while a hardcoded head stayed frozen at 1328px, stranding
   "View all N deals" ~500-1100px short of the box's right edge at
   1920-2560px. Reverted to width:auto (block default) so head always fills
   the same content width as grid, at every viewport — matches grid/box edge
   exactly (verified at 1440/1920/2560px) instead of only at 1440px.
   Undo: restore mgk-retail.css.bak-20260811-flashwrap-head-width-revert. */
.mgk-flashwrap__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding: 0 24px; }
/* Figma spec: this cluster's gap is 12px at the 1440 reference width (was
   14px). Undo: restore mgk-retail.css.bak-20260811-flashdeals-head-gap. */
.mgk-flashwrap__head-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mgk-flashwrap__title { font-family: 'Quicksand', inherit; font-weight: 700; font-size: 22px; color: var(--mgk-red); }
.mgk-flashwrap__countdown { display: flex; align-items: center; gap: 6px; }
.mgk-flashwrap__seg { background: #F04438; color: #fff; font-weight: 700; font-size: 14px; padding: 4px 8px; border-radius: 7px; min-width: 17px; text-align: center; }
/* Home Flash Deals countdown digits sit on the red .mgk-flashwrap__seg chip
   itself (unlike the Sale page's white .mgk-sale__clock-seg card) — override
   .mgk-sale__clock-num's red text back to white here so it stays readable. */
.mgk-flashwrap__seg .mgk-sale__clock-num { color: #fff; font-size: 14px; font-weight: 700; line-height: 1; }
.mgk-flashwrap__colon { color: var(--mgk-red); font-weight: 700; }
/* Mobile-only flash header decoration (the "MALL % FLASH SALE" ribbon, the
   bolt, and the ENDS IN / HRS / MIN / SEC captions) lives in flash-deals.php
   for every breakpoint but only shows ≤640px — desktop keeps the plain
   "⚡ Flash Deals" text + bare HH:MM:SS chips it already had. */
.mgk-flashwrap__lockup, .mgk-flashwrap__endsin, .mgk-flashwrap__cap,
.mgk-flashwrap__viewall--mobile { display: none; }
.mgk-flashwrap__seg-wrap { display: contents; }

/* Mobile bottom tab bar (shared/tabbar.php) — rendered site-wide from the
   Footer widget but phone-only chrome; the ≤640px block far below turns it on.
   Hidden here so desktop/tablet never show it. */
.mgk-tabbar { display: none; }

/* Section "View all" labels (mgk_cta_label(), inc/mgk-sections.php). The phone
   design words several of these differently ("Order history ›", "N edits →"),
   so both variants ship in the DOM and exactly one shows per breakpoint.
   Desktop = its own editable copy; the ≤640px block swaps to the phone text. */
.mgk-cta__d { display: inline; }
.mgk-cta__m { display: none; }
/* Category tiles: the stroked SVG glyph and the "See all" chevron tile are the
   phone design's treatment only — desktop keeps the merchant-set emoji. */
.mgk-cat-card--all { display: none; }

/* Phone-only icon variants (.mgk-icon-m) — the mockup's stroked 24×24 outlines
   for the header search/cart/bell. They ship alongside the theme's own filled
   glyphs (different geometry, so CSS can't convert one into the other); the
   ≤640px block swaps which is shown. Hidden by default = desktop unchanged. */
.mgk-icon-m { display: none; }
/* Sub-lines follow the same rule: the phone design adds a one-liner under
   several headings that desktop leaves blank, so it ships as a mobile-only <p>
   (mgk_sub_line()) and desktop's spacing is unchanged. */
.mgk-sub__m { display: none; }
.mgk-flashwrap__viewall { color: #165DFF; font-weight: 700; font-size: 13px; text-decoration: none; }
.mgk-flashwrap__viewall:hover { text-decoration: underline; }
/* Full-bleed desktop (see .mgk-section.mgk-flashwrap above): a hard
   repeat(5, 1fr) turns every extra pixel of viewport into wider cards, so on a
   2560px screen the 256px design card becomes ~490px while the media stayed
   locked at height:176px — the photo frame flattens out and drifts far from
   the mockup's shape. auto-fit + minmax spends the extra width on MORE
   columns instead, holding each card near its design size. 256px is the design
   width computed from the 1440px frame (1440 - 48 section pad - 48 box pad -
   64 gap, / 5), so 1440px still lays out the original 5 across.

   STRICTLY ONE ROW: never wraps, never scrolls, never overflows. The row fills
   the full box width with as many cards as fit and clips the rest — surplus
   deals aren't reachable here, the head's "View all N deals" link is the way to
   the rest and always reports the true total.

   The two requirements pull against each other, so each gets its own mechanism:
   - HOW MANY cards: auto-fit + minmax(256px, 1fr) picks the column count from
     the 256px design width — 4 across at 1280px, 5 at 1600px, 9 at 2560px.
   - NO GAP AT THE RIGHT EDGE: the 1fr max lets those columns share out the
     leftover width, so the row always ends flush with the box. Cards land a bit
     over 256px rather than leaving a 200-270px hole on the right (which fixed
     256px tracks would, and which is the same wasted-whitespace problem as a
     half-empty second row, just moved sideways).
   Card width therefore varies by at most one column's worth of slack, and the
   16/11 media aspect-ratio keeps every photo frame in proportion as it does.

   What keeps it to ONE row is NOT css: the column count varies with the
   viewport, so no static rule can know how many cards fit. mgk-retail.js
   measures the realised column count and hides the surplus -- see
   mgkFitOneRow(). grid-auto-flow:column was tried and rejected: it turns the
   surplus into real columns, overshooting the container so nothing is left for
   1fr to distribute (every card locks to 256px, right edge goes ragged).
   overflow:hidden remains a guard for the moment before the JS runs.

   Track floor is 256px, same as the product grids below (.mgk-products/
   .mgk-shop/.mgk-reviews) — it used to be nudged to 250px to compensate for
   .mgk-flashwrap__box's own 24px side padding stacking on top of the 24px
   section padding, which gave this grid ~48px less real width than those
   other sections at the same viewport and silently dropped the column
   count at several breakpoints (not just a narrower card — a different
   column count than the sections it's meant to match). Now that the box's
   horizontal padding has moved to .mgk-flashwrap__head instead (this grid
   sits flush with the section edge, just like .mgk-products/.mgk-shop do),
   there is nothing left to compensate for, so the floor goes back to the
   same 256px design width everyone else uses.
   Undo: restore mgk-retail.css.bak-20260827-flashwrap-margin-root-fix. */
/* auto-fill, not auto-fit: with only 1-2 deals live (tail end of a sale
   campaign) auto-fit collapsed the empty trailing tracks and threw their 1fr
   share onto the 1-2 real cards, stretching them to fill the row — and since
   .mgk-flashcard__media below is aspect-ratio 16/11, the photo ballooned too,
   clipped by this card's fixed height. Same fix already proven on
   .mgk-products/.mgk-shop above (~line 749/856): auto-fill keeps every track
   minmax(250px, 1fr) would give a full row and leaves unused ones as blank
   space after the last card, so a short Flash Deals row now matches a full
   row's card width instead of inflating. Pixel-identical to the old auto-fit
   behaviour whenever the row is actually full.
   Undo: restore mgk-retail.css.bak-20260814-flashdeals-autofill. */
.mgk-flashwrap__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
	gap: 16px;
	overflow: hidden;
}
/* Figma spec: card is exactly 367px tall at the 1440 reference width, no
   per-product variance — the name-clamp fix above already gets every card
   to ~363px, but "Hug" still lets real content nudge it a few px either
   way. Fixing the height outright removes that: align-items:stretch on
   .mgk-flashwrap__grid only stretches children with an auto height, so once
   height is a definite 367px here it wins outright, same on every card
   regardless of which products are on sale. Purely additive vs the ~363px
   natural height, so nothing clips; the few spare px land as empty space
   after .mgk-flashcard__cta since .mgk-flashcard__body's own children don't
   flex-grow. Undo: restore
   mgk-retail.css.bak-20260811-flashcard-fixed-height-367. */
.mgk-flashcard { height: 367px; background: #fff; border: 1px solid #F2F3F5; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
/* Surplus cards hidden by mgkFitOneRow(). The UA's `[hidden] { display: none }`
   loses to the `display: flex` above, so restate it here. */
.mgk-flashcard[hidden] { display: none; }
.mgk-flashcard:hover { box-shadow: var(--mgk-shadow-lg); border-color: #1E3545; }
.mgk-flashcard:hover .mgk-flashcard__buy { background: #0D3985; }
/* Photo frame keeps the mockup's SHAPE rather than a fixed pixel height: at the
   1440px design frame a card is 256px wide with a 176px image, so 256/176 =
   16/11 is the ratio to hold. With height:176px hard-coded, any card that ends
   up wider or narrower than 256px (full-bleed desktop, or the 2-col phone
   grid) stretched the frame horizontally only and the photo went squat.
   aspect-ratio ties height to the card's real width, so the frame stays the
   same shape at every column count. min-height guards the narrowest phone
   card from collapsing the photo to a sliver. */
.mgk-flashcard__media { display: block; position: relative; aspect-ratio: 16 / 11; min-height: 132px; background: var(--mgk-ph-bg); overflow: hidden; }
body .mgk-flashcard__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-flashcard__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
/* Corner badges — same rule site-wide (see .mgk-sale__deal-tag/-ribbon and
   .mgk-prod__pct/__tag): top-left is the sale % ONLY, top-right is the
   Best Seller ribbon ONLY, never a cert badge. Cert badges (halal/organic/
   sfa) live below the image in .mgk-flashcard__badges instead. */
.mgk-flashcard__pct { position: absolute; left: 12px; top: 12px; background: var(--mgk-red); color: #fff; font-weight: 700; font-size: 12px; padding: 4px 9px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
/* .mgk-flashcard__ribbon is styled by the shared Tag/BestSeller rule above
   (with .mgk-prod__tag) — no per-section size/position of its own, so the
   badge is identical across sections. */

/* Merchant-uploaded Sale Campaign tag (Sale Campaigns admin -> "Sale Tag
   Image") — replaces the old static camplain_tag.svg mockup banner. Full
   sizing rule is shared with every other card family at .mgk-prod__saletag;
   nothing to override here. */

.mgk-flashcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
/* Cert chip row lives in the card body (below the image), same pattern as
   shared/prod-card.php's .mgk-prod__badges. */
.mgk-flashcard__badges { display: flex; flex-wrap: wrap; gap: 4px; min-height: 24px; }
/* Cert chips excluded — see the same :not() on .mgk-prod__badges above. */
.mgk-flashcard__badges .mgk-chip:not(.mgk-chip--halal):not(.mgk-chip--organic):not(.mgk-chip--sfa) { padding: 2px 8px; font-size: 10px; }
/* Figma spec: card is Hug 367px tall at the 1440 reference width — an
   unclamped name can wrap to 2 lines (+21px) whenever a real product name is
   longer than the mock text, which is what pushed the live card to ~384px.
   Clamping to 1 line brings every card back to the spec height regardless of
   which products are on sale. Undo: restore
   mgk-retail.css.bak-20260811-flashcard-name-ellipsis. */
.mgk-flashcard__name { font-size: 14px; font-weight: 600; color: var(--mgk-navy-900); text-decoration: none; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgk-flashcard__price { display: flex; align-items: center; gap: 8px; }
.mgk-flashcard__now { font-size: 17px; font-weight: 700; color: #C5342A; }
.mgk-flashcard__was { font-size: 12px; color: var(--mgk-text-3); text-decoration: line-through; }
.mgk-flashcard__progress { display: flex; flex-direction: column; gap: 5px; }
.mgk-flashcard__track { height: 6px; border-radius: 999px; background: #EBF0F6; overflow: hidden; }
.mgk-flashcard__track span { display: block; height: 100%; background: #F09830; border-radius: 999px; }
.mgk-flashcard__labels { display: flex; justify-content: space-between; font-size: 10px; }
.mgk-flashcard__labels span:first-child { color: var(--mgk-text-3); font-weight: 600; }
.mgk-flashcard__labels span:last-child { color: var(--mgk-red); font-weight: 700; }
.mgk-flashcard__cta { display: flex; gap: 10px; margin-top: auto; }
.mgk-flashcard__buy { flex: 1; background: #1363FF; color: #fff; font-weight: 700; font-size: 12px; padding: 9px 0; border: none; border-radius: 10px; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; transition: background .2s; }
.mgk-flashcard__addicon { width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--mgk-border); border-radius: 9px; background: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.mgk-flashcard__wish { flex: 1; background: var(--mgk-red-bg); color: var(--mgk-red); font-weight: 700; font-size: 11px; padding: 9px 0; border: none; border-radius: 10px; cursor: pointer; }
.mgk-flashcard__wish:hover { background: var(--mgk-red); color: #fff; }
@media (max-width: 1100px) {
	/* Tablet keeps the same one-row rule, just a smaller minimum track so 3 cards
	   still fit a ~1000px box instead of dropping to 2. Only the track floor
	   changes — flow, row pinning and clipping inherit from the desktop rule. */
	.mgk-flashwrap__grid {
		grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
		grid-auto-columns: minmax(188px, 1fr);
	}
}
@media (max-width: 640px) {
	.mgk-flashwrap__box { padding: 16px 16px 40px; }
	/* Single horizontal-scroll row instead of a wrapping 2-col grid — matches
	   the app-mockup's Flash Deals strip (one swipeable row, not stacked rows). */
	/* Phone keeps its swipeable strip, so the desktop one-row clipping (overflow
	   hidden + the round() width snap) is reset back to a scrollable auto width. */
	.mgk-flashwrap__grid { display: flex; grid-template-columns: none; max-width: none; width: auto; gap: 12px; overflow: visible; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
	.mgk-flashwrap__grid::-webkit-scrollbar { display: none; }
	.mgk-flashcard { flex: 0 0 162px; }
}

/* ── 006 Promo (Today's Promotion) ────────────────────────────── */
/* Always shows every tile (no 4-tile cap) in one horizontally scrollable
   row instead of a fixed 4-column grid — same pattern as the Category Grid
   (see "004 Category Grid" above): hidden-at-rest scrollbar that fades in
   on hover. Tile width is 289px — Figma spec (previously 294px, a tuned
   approximation picked before the exact spec was on hand: "~4.5 tiles show
   at a time on a 1440px viewport"; 289px still lands close to that, just
   pixel-accurate now). Tile width is new; every other .mgk-promo-tile*
   rule below (image/CTA/voucher styling) is unchanged.
   Undo: restore mgk-retail.css.bak-20260811-promo-tile-289px. */
/* Gap is 20px. Undo: restore mgk-retail.css.bak-20260811-promo-tiles-gap-20px. */
.mgk-promo__tiles { display: flex; gap: 20px; width: 100%; min-width: 0; overflow-x: auto; padding-bottom: 4px; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.mgk-promo__tiles:hover { scrollbar-color: var(--mgk-border) transparent; }
.mgk-promo__tiles::-webkit-scrollbar { height: 6px; }
.mgk-promo__tiles::-webkit-scrollbar-track { background: transparent; }
.mgk-promo__tiles::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.mgk-promo__tiles:hover::-webkit-scrollbar-thumb { background: var(--mgk-border); }
.mgk-promo-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 4px; flex: 0 0 289px; width: 289px; min-height: 154px; border-radius: 12px; padding: 16px; overflow: hidden; color: var(--mgk-navy-800); text-shadow: 0 2px 20px rgba(0,0,0,.15); background-size: cover; background-position: center; box-sizing: border-box; }
.mgk-promo-tile--amber { background-color: var(--mgk-amber-bg); background-image: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.75)), var(--mgk-promo-tile-bg, none); }
.mgk-promo-tile--green { background-color: var(--mgk-green-bg); background-image: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.75)), var(--mgk-promo-tile-bg, none); }
.mgk-promo-tile--teal  { background-color: var(--mgk-teal-bg);  background-image: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.75)), var(--mgk-promo-tile-bg, none); }
.mgk-promo-tile--red   { background-color: var(--mgk-red-bg);   background-image: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.75)), var(--mgk-promo-tile-bg, none); }
.mgk-promo-tile--sfa   { background-color: var(--mgk-sfa-bg);   background-image: linear-gradient(135deg, rgba(255,255,255,.15), rgba(255,255,255,.75)), var(--mgk-promo-tile-bg, none); }
.mgk-promo-tile--seasonal { background-color: var(--mgk-teal-bg); background-image: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.55)), var(--mgk-promo-tile-bg, none); text-decoration: none; }
/* Image-only seasonal tile (no text overlay) shows the CTA image at full clarity — no whitening gradient needed since there's no text to keep legible over it. */
.mgk-promo-tile--seasonal.mgk-promo-tile--has-image { background-image: var(--mgk-promo-tile-bg, none); }
.mgk-promo-tile__heading { font-size: 14px; font-weight: 800; }
.mgk-promo-tile__sub { font-size: 11px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.mgk-promo-tile__cta { position: absolute; top: 12px; right: 12px; background: var(--mgk-navy-800); color: #fff; font-size: 10px; font-weight: 600; padding: 4px 12px; border-radius: 999px; text-decoration: none; text-shadow: none; }
/* Voucher offer tile (Today's Promotion, first-come): copy the code → apply at cart. */
.mgk-promo-tile--voucher { display: flex; flex-direction: column; gap: 4px; }
.mgk-promo-tile__code { align-self: flex-start; margin-top: 8px; background: #fff; color: var(--mgk-navy-800); border: 1px dashed var(--mgk-navy-800); font-size: 12px; font-weight: 800; letter-spacing: .3px; padding: 5px 12px; border-radius: 8px; cursor: pointer; text-shadow: none; }
.mgk-promo-tile__code:hover { background: var(--mgk-navy-800); color: #fff; }
.mgk-promo-tile__meta { font-size: 10px; font-weight: 600; opacity: .8; margin-top: 4px; text-shadow: none; }

/* ── 007 AutoPilot ─────────────────────────────────────────── */
.mgk-autopilot { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: linear-gradient(120deg, var(--mgk-navy-900) 0%, var(--mgk-navy-700) 100%); border-radius: 16px; overflow: hidden; padding: 40px; flex-wrap: wrap; }
.mgk-autopilot__text { flex: 1; min-width: 260px; color: #fff; }
.mgk-autopilot__badge { margin-bottom: 12px; }
.mgk-autopilot__heading { color: #fff; font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.mgk-autopilot__sub { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.6; margin: 0 0 20px; max-width: 46ch; }
.mgk-autopilot__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.mgk-autopilot__aside { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 140px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); }
.mgk-autopilot__savings { font-size: 32px; font-weight: 900; color: #fff; }
.mgk-autopilot__savings-cap { color: rgba(255,255,255,.7); font-size: 12px; }

/* ── 008 Reviews ───────────────────────────────────────────── */
.mgk-review__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mgk-review__avatar { background: var(--mgk-navy); color: #fff; width: 40px; height: 40px; border-radius: var(--mgk-radius-sm); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.mgk-review__meta { display: flex; align-items: center; gap: 6px; }
.mgk-review__name { font-weight: 600; font-size: 14px; color: var(--mgk-text); }
.mgk-review__date { color: var(--mgk-text-3); font-size: 12px; }
.mgk-review__stars { color: var(--mgk-amber); font-size: 14px; margin-bottom: 8px; }
.mgk-review__text { color: var(--mgk-text-2); font-size: 14px; line-height: 1.6; margin: 0; }

/* ── 009 Sourcing ──────────────────────────────────────────── */
.mgk-sourcing { display: flex; align-items: stretch; background: var(--mgk-navy); border-radius: var(--mgk-radius); overflow: hidden; }
.mgk-sourcing__media { width: 288px; flex-shrink: 0; background: linear-gradient(135deg, var(--mgk-navy-lt), var(--mgk-navy-md)); }
.mgk-sourcing__body { flex: 1; padding: 32px; color: #fff; }
.mgk-sourcing__badge { margin-bottom: 12px; }
.mgk-sourcing__heading { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 12px; }
.mgk-sourcing__sub { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.mgk-sourcing__pillars { display: flex; gap: 16px; flex-wrap: wrap; }
.mgk-sourcing__pillar { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.7); font-size: 14px; }

/* ── 010 Footer (brand block + single-row link list) ─────────────────────── */
/* Side padding is 24px to match the full-bleed section group above (.mgk-products
   et al.), not the 32px it used to carry: the footer's first/last text column has
   to line up with the card rows' left/right edges. Vertical stays 32px. */
.mgk-footer { background: var(--mgk-surface); color: var(--mgk-text-2); padding: 32px 24px; margin-top: 32px; border-top: 1px solid var(--mgk-border); }
/* The --mgk-maxw column is dropped for the same reason the sections dropped it:
   with a 1440px cap the footer content stayed centred while the rows above ran
   the full viewport, so on a wide screen the brand block sat far inboard of the
   product cards. Full width + the parent's 24px pad puts them on one edge. */
.mgk-footer__row { max-width: none; margin: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; font-size: 14px; }
.mgk-footer__brand { display: flex; flex-direction: column; gap: 6px; }
.mgk-footer__brand-head { display: flex; align-items: center; gap: 8px; }
.mgk-footer__logo { width: 32px; height: 32px; border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); border: 1px solid var(--mgk-navy-700); color: var(--mgk-navy-900); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; flex-shrink: 0; }
.mgk-footer__logo--img { border: none; background: none; object-fit: contain; }
.mgk-footer__company { font-weight: 700; font-size: 16px; margin: 0; color: var(--mgk-text); }
.mgk-footer__legal-line { margin: 0; line-height: 1.5; }
.mgk-footer__certs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; font-size: 12px; }
.mgk-footer__cert { color: var(--mgk-text-2); }
.mgk-footer__socials { display: flex; gap: 12px; margin-top: 8px; }
.mgk-footer__social { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--mgk-border); text-decoration: none; font-size: 15px; transition: opacity .15s ease; }
.mgk-footer__social:hover { opacity: .7; }
.mgk-footer__links { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mgk-footer__link { color: var(--mgk-text-2); text-decoration: none; transition: opacity .15s ease; }
.mgk-footer__trust { align-self: flex-start; }
.mgk-footer__link:hover { opacity: .7; }
/* No <=640px stacking rule here any more: the app design drops the footer
   entirely on a phone, so .mgk-footer__row is hidden at that width (see
   "107 No footer on mobile" in the Batch 1 skin) and had nothing left to stack. */

/* ── 011 Breadcrumb ────────────────────────────────────────── */
.mgk-breadcrumb { background: var(--mgk-surface); border-bottom: 1px solid var(--mgk-border); padding: 10px var(--mgk-pad-x); }
.mgk-breadcrumb__inner { max-width: var(--mgk-maxw); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
/* Search Results runs the trail flush to the viewport edge. .mgk-header is
   position:fixed with a plain 24px padding and no --mgk-maxw cap, so past
   1440px the capped inner would sit ~240px further in than the FM logo above
   it. Opt-in modifier, not a global change: Category Landing and the PDP still
   want the trail aligned with their own centred content column. */
.mgk-breadcrumb--flush .mgk-breadcrumb__inner { max-width: none; margin: 0; }
.mgk-breadcrumb__crumb { color: var(--mgk-text-3); }
.mgk-breadcrumb__crumb.is-current { color: var(--mgk-navy); font-weight: 600; }
/* A crumb carrying a URL renders as <a> (see pages/breadcrumb.php). Kill the UA
   underline so a linked trail is visually identical to a plain-text one, and
   bring it back on hover/focus as the only affordance. :focus-visible keeps the
   keyboard path visible without ringing on mouse clicks. */
a.mgk-breadcrumb__crumb { text-decoration: none; }
a.mgk-breadcrumb__crumb:hover,
a.mgk-breadcrumb__crumb:focus-visible { text-decoration: underline; color: var(--mgk-navy); }
.mgk-breadcrumb__sep { color: var(--mgk-text-3); }

/* ── 012 Category Hero (flat full-width banner, same pattern as .mgk-hero) ──
   Frame is pinned to the reference design image's exact ratio
   (Pasted-image-1.png, 2560×1050px — see MGK_CATEGORY_BANNER_WIDTH/HEIGHT in
   mu-plugins/mgk-retail-core/includes/admin/category-banner.php). Any
   uploaded image of a different size is resized/cropped to fill this frame
   via object-fit: cover, centered — never stretched. */
.mgk-cathero2.mgk-hero > .mgk-hero__banner,
.mgk-cathero2__banner--ph {
	aspect-ratio: 2560 / 1050;
	height: auto;
	object-fit: cover;
	object-position: center;
}
.mgk-cathero2__banner--ph { display: block; width: 100%; border-radius: var(--mgk-radius-lg); background: linear-gradient(135deg, var(--mgk-navy) 0%, var(--mgk-navy-md) 100%); }


/* ── 013 Search Bar ────────────────────────────────────────── */
.mgk-searchbar { background: var(--mgk-surface); border-bottom: 1px solid var(--mgk-border); padding: 16px var(--mgk-pad-x); }
.mgk-searchbar__inner { max-width: var(--mgk-maxw); margin: 0 auto; }
.mgk-searchbar__form { display: flex; align-items: center; gap: 12px; max-width: 640px; }
.mgk-searchbar__field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); border: 1px solid var(--mgk-border); }
.mgk-searchbar__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 16px; color: var(--mgk-text-3); }
.mgk-searchbar__icon svg { display: block; width: 1em; height: 1em; fill: currentColor; }
.mgk-searchbar__input { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; padding: 0; border: none; outline: none; background: transparent; font-size: 14px; font-family: inherit; color: var(--mgk-text); }
.mgk-searchbar__input::-webkit-search-decoration, .mgk-searchbar__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.mgk-searchbar__related { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.mgk-searchbar__related-label { color: var(--mgk-text-3); font-size: 12px; }

/* ── 014 Shop (filters + grid) ─────────────────────────────── */
.mgk-shop__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.mgk-shop__grid--full { grid-template-columns: minmax(0, 1fr); }
.mgk-shop__filters-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); cursor: pointer; }
.mgk-shop__filters-toggle:hover { border-color: var(--mgk-navy); }
.mgk-shop__filters-toggle:hover .mgk-funnel { border-top-color: var(--mgk-navy); }
.mgk-shop__filters-toggle:hover .mgk-funnel::after { background: var(--mgk-navy); }
/* CSS-drawn funnel/filter icon: a triangle (border trick) + a stem. */
.mgk-funnel { position: relative; display: inline-block; width: 14px; height: 10px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 8px solid var(--mgk-text); }
.mgk-funnel::after { content: ""; position: absolute; left: 50%; top: 8px; transform: translateX(-50%); width: 2px; height: 6px; background: var(--mgk-text); }
/* Filter panel: a 4-column grid of facet cards above the product grid
   (toggled by the funnel button), each column the same width whether or not
   every column currently holds a card — the catalog ships 2 facets today
   (Category, Price) but is designed for 4 (Country of Origin and Product
   Tags land later), so columns stay evenly sized instead of stretching to
   fill the row. Options inside each card stack one per line — picking one
   submits the form immediately (see data-mgk-autofilter), so there is no
   separate Apply/Clear button. */
.mgk-shop__sidebar { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mgk-shop__sidebar.is-open { display: grid; }
.mgk-shop__sidebar .mgk-filter { width: auto; }
.mgk-filter__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mgk-filter__title { font-size: 15px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-filter__opts { display: flex; flex-direction: column; gap: 8px; }
.mgk-filter__opt { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.mgk-filter__opt input { accent-color: var(--mgk-navy); }
.mgk-filter__label { color: var(--mgk-text-2); }
.mgk-filter__count { color: var(--mgk-text-3); font-size: 12px; margin-left: auto; }
.mgk-cattree__node + .mgk-cattree__node { margin-top: 8px; }
.mgk-cattree__row { display: flex; align-items: center; gap: 6px; }
.mgk-cattree__row .mgk-filter__opt { flex: 1; min-width: 0; }
.mgk-cattree__toggle, .mgk-cattree__spacer { flex: 0 0 18px; width: 18px; height: 18px; }
.mgk-cattree__toggle { background: none; border: none; cursor: pointer; padding: 0; color: var(--mgk-text-3); font-size: 11px; line-height: 18px; text-align: center; }
.mgk-cattree__toggle::before { content: "▸"; display: inline-block; transition: transform .15s ease; }
.mgk-cattree__toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.mgk-cattree__children { margin-top: 8px; margin-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.mgk-cattree__children[hidden] { display: none; }
.mgk-zone { background: var(--mgk-teal-bg); border-color: rgba(0,153,179,.27); }
.mgk-zone__title { color: var(--mgk-teal); font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.mgk-zone__text { color: var(--mgk-teal); font-size: 12px; margin: 0 0 10px; }
.mgk-zone__cta { width: 100%; }
.mgk-shop__main { display: flex; flex-direction: column; gap: 16px; }

/* ── Search Results toolbar — result heading/count + quick-toggles/pills row (ui-retail search.svg) ── */
.mgk-shop__resultsbar { display: flex; flex-direction: column; gap: 4px; }
.mgk-shop__resultheading { font-size: 24px; line-height: 32px; font-weight: 500; color: var(--mgk-navy-900); margin: 0; }
.mgk-shop__count { font-size: 14px; font-weight: 600; color: var(--mgk-navy-900); margin: 0; }
/* ── Search screen, PHONE ONLY ────────────────────────────────────────────
   Both of these are display:none here and switched on inside the phone
   breakpoint below, so desktop renders exactly what it rendered before:
   the 2026-07-27 ruling (no page-level search bar on desktop, the header
   already has one) still holds there.

   .mgk-shop__msearch    the search row the phone header cannot provide,
                         because it collapses its field to an icon and hides
                         even that on inner pages.
   .mgk-shop__count--m   the phone's single-sentence «N results for "q"»,
                         replacing the desktop heading + count pair. */
.mgk-shop__msearch { display: none; }
.mgk-shop__count--m { display: none; }

.mgk-shop__toolbar { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.mgk-shop__quicktoggles { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.mgk-qt { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--mgk-navy-900); }
.mgk-qt input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: pointer; }
.mgk-qt__box { position: relative; width: 18px; height: 18px; flex: none; border: 1.5px solid #C7D2DD; border-radius: 5px; background: var(--mgk-surface); }
.mgk-qt input:checked + .mgk-qt__box { background: var(--mgk-cta-blue); border-color: var(--mgk-cta-blue); }
/* inset:0 + margin:auto centers the 5×10 rect itself within the 18×18 box
   before the rotate — the previous fixed left/top offsets centered the
   UNROTATED box instead, which swings the rotated tick off-center (same bug
   as .mgk-seasoncamp__check's tick, fixed the same way there). */
.mgk-qt input:checked + .mgk-qt__box::after { content: ""; position: absolute; inset: 0; margin: auto; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.mgk-qt input:focus-visible + .mgk-qt__box { outline: 2px solid var(--mgk-cta-blue); outline-offset: 2px; }

.mgk-shop__pills { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mgk-pill { position: relative; }
.mgk-pill__btn { display: flex; align-items: center; gap: 6px; background: var(--mgk-bg-alt); border: none; border-radius: 999px; padding: 9px 12px 9px 15px; font-weight: 700; font-size: 13px; color: var(--mgk-navy-900); font-family: inherit; cursor: pointer; }
.mgk-pill__btn svg { width: 16px; height: 16px; color: var(--mgk-navy-900); transition: transform .15s ease; }
.mgk-pill__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mgk-pill.is-active .mgk-pill__btn { background: var(--mgk-navy-900); color: #fff; }
.mgk-pill.is-active .mgk-pill__btn svg { color: #fff; }
.mgk-pill__panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 220px; max-height: 320px; overflow-y: auto; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); box-shadow: var(--mgk-shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.mgk-pill__panel[hidden] { display: none; }
/* UNDO POINT: Bỏ class .mgk-pill--align-right ở flashdeal.php hoặc xóa dòng dưới để undo */
.mgk-pill--align-right .mgk-pill__panel { left: auto; right: 0; }
.mgk-pill__opt { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--mgk-text-2); }
.mgk-pill__opt:hover { background: var(--mgk-bg-alt); }
.mgk-pill__opt input { accent-color: var(--mgk-navy); flex: none; }
.mgk-pill__count { margin-left: auto; color: var(--mgk-text-3); font-size: 13px; }
.mgk-pill__clear { align-self: flex-start; margin-top: 6px; padding: 6px 8px; background: none; border: none; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--mgk-cta-blue); text-decoration: underline; cursor: pointer; }
.mgk-pill__clear:hover { opacity: .75; }
.mgk-pill__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.mgk-pill__actions .mgk-pill__clear { margin-top: 0; }
.mgk-pill__view { flex: 1 1 auto; white-space: nowrap; padding: 10px 20px; background: #1363FF; border: none; border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.mgk-pill__view:hover { opacity: .9; }
.mgk-shop__reset { color: var(--mgk-cta-blue); font-size: 14px; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.mgk-shop__reset:hover { opacity: .75; }
@media (max-width: 720px) {
	.mgk-shop__pills { margin-left: 0; width: 100%; }
	.mgk-pill { flex: 1 1 auto; }
	.mgk-pill__btn { width: 100%; justify-content: space-between; }
}
.mgk-shop__pagination { display: flex; justify-content: center; margin-top: 8px; }
/* Infinite-scroll status line — phone only (the sentinel the observer watches).
   Desktop pages through the pager above and never starts the observer, so this
   stays out of the flow there entirely, not merely [hidden]. */
.mgk-shop__infinite { display: none; }
.mgk-shop__pagination ul.page-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mgk-shop__pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); color: var(--mgk-text); font-size: 14px; text-decoration: none; background: var(--mgk-surface); }
.mgk-shop__pagination a.page-numbers:hover { border-color: var(--mgk-navy); color: var(--mgk-navy); }
.mgk-shop__pagination .page-numbers.current { background: var(--mgk-navy); border-color: var(--mgk-navy); color: #fff; font-weight: 600; }
.mgk-shop__pagination .page-numbers.dots { border-color: transparent; background: transparent; }
.mgk-delivery { background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 14px; }
.mgk-delivery__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; color: var(--mgk-text); margin-bottom: 8px; }
.mgk-delivery__cap { color: var(--mgk-teal); }
.mgk-delivery__track { height: 8px; border-radius: 999px; background: var(--mgk-border); overflow: hidden; }
.mgk-delivery__fill { display: block; height: 100%; border-radius: 999px; background: var(--mgk-teal); }
.mgk-delivery__fill.is-done { background: var(--mgk-green); }
.mgk-delivery__cart { margin: 8px 0 0; font-size: 12px; color: var(--mgk-text-3); }

/* ── Search Results — "0 results" heading + no-results state (ui-retail search.svg) ── */
.mgk-shop__resultheading { font-size: 24px; line-height: 32px; font-weight: 500; color: var(--mgk-navy-900); margin: 0; }
.mgk-shop__noresults { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 500px; margin: 64px auto; text-align: center; }
.mgk-shop__noresults-title { font-family: 'Quicksand', inherit; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; }
.mgk-shop__noresults-sub { font-size: 14px; line-height: 20px; color: #86909C; margin: 0; }
/* Illustrated magnifying-glass icon — inline SVG matching the ui-retail vector 1:1. */
.mgk-nric { display: block; width: 96px; height: 96px; flex: none; }
.mgk-nric svg { display: block; width: 100%; height: 100%; }

/* ── Search Results — "Today's Fresh Picks" fallback (always shown, ui-retail search.svg) ── */
.mgk-freshpicks__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.mgk-freshpicks__title { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--mgk-text-dark); margin: 0; }
/* "N products" line in the category chip band — PHONE ONLY. The desktop strip is
   chips + sort on one row with no count (the count lives on the chip itself as a
   badge there), so it is hidden by default and switched on in the 640px block. */
.mgk-coltabs__count-line { display: none; }

.mgk-freshpicks__arrows { display: flex; align-items: center; gap: 12px; }
/* featured-products.php emits the arrows on every page that uses the widget
   (home, fresh-deal, PDP), but its .mgk-grid only becomes a scroller on the
   PDP at mobile width — everywhere else the cards wrap in a grid and the
   arrows would have nothing to scroll. Hidden by default here; the PDP mobile
   block (§ "Similar products") is the only place that switches them back on. */
.mgk-products__arrows { display: none; }
/* "Popular in Singapore"'s Load More trigger — see initTrendingLoadMore() in
   mgk-retail.js. The wrapping div (not the button itself) is what gets
   [hidden] once the last page loads, so the button's own disabled/label
   states during a fetch stay untouched by that. */
.mgk-products__loadmore { display: flex; justify-content: center; margin-top: 24px; }
.mgk-products__loadmore .mgk-btn { min-width: 160px; }
.mgk-freshpicks__arrow { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: 9999px; background: #F8FAFB; cursor: pointer; }
.mgk-freshpicks__arrow:hover { background: var(--mgk-bg-alt); }
.mgk-chev { position: relative; display: inline-block; width: 8px; height: 8px; }
.mgk-chev::before { content: ""; position: absolute; inset: 0; border-top: 2px solid #4E5969; border-right: 2px solid #4E5969; }
.mgk-chev--left::before { transform: rotate(-135deg); }
.mgk-chev--right::before { transform: rotate(45deg); }
.mgk-freshpicks__row { display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.mgk-freshpicks__row::-webkit-scrollbar { display: none; }
.mgk-freshpicks__row .mgk-prod { flex: 0 0 calc((100% - 24px * 4) / 5); min-width: 200px; }
@media (max-width: 1024px) {
	.mgk-freshpicks__row .mgk-prod { flex-basis: calc((100% - 24px * 2) / 3); }
}
@media (max-width: 720px) {
	.mgk-freshpicks__row .mgk-prod { flex-basis: calc((100% - 16px) / 2); min-width: 160px; }
	.mgk-freshpicks__row { gap: 16px; }
}

/* ── Shared atoms (qty / fields / option cards / gst / stepper / timeline) ── */
.mgk-card__title { font-size: 16px; font-weight: 700; color: var(--mgk-text); margin: 0 0 12px; }
/* checkou.svg spec: each of the merged Checkout page's 4 cards has a small
   black step-number circle before its title (Delivery Method/Address/Time/
   Payment) — scoped to .mgk-checkout so it doesn't affect .mgk-card__title
   elsewhere (Cart, Profile, etc. reuse the same base class). */
.mgk-checkout .mgk-card__title { display: flex; align-items: center; gap: 10px; }
.mgk-checkout .mgk-card__step { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; background: #000; color: #fff; font-size: 12px; font-weight: 700; }
.mgk-checkout__signin { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: #EFF4FE; border-radius: 12px; font-family: 'Quicksand', var(--mgk-font); font-size: 13px; font-weight: 600; color: #1B3A52; margin-bottom: 14px; }
.mgk-checkout__signin a { color: #1363FF; font-weight: 700; text-decoration: underline; }
.mgk-card__sub { font-size: 13px; color: var(--mgk-text-2); margin: -6px 0 14px; }
.mgk-checkout__addrhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mgk-checkout__addrpicker { position: relative; flex-shrink: 0; }
.mgk-checkout__addrlist { left: auto; right: 0; width: 260px; padding: 4px; }
.mgk-checkout__addrlist-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; background: none; border: none; cursor: pointer; font-family: inherit; }
.mgk-checkout__addrlist-item:hover { background: var(--mgk-bg-alt); }
.mgk-checkout__addrlist-label { font-size: 13px; font-weight: 600; color: var(--mgk-text); display: flex; align-items: center; gap: 6px; }
.mgk-checkout__addrlist-detail { font-size: 12px; color: var(--mgk-text-3); }
.mgk-checkout__addrsummary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--mgk-bg-alt); border-radius: var(--mgk-radius-sm); margin-bottom: 12px; }
.mgk-checkout__addrsummary[hidden] { display: none; }
.mgk-checkout__addrsummary-body { min-width: 0; }
.mgk-checkout__addrsummary-who { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--mgk-text); }
.mgk-checkout__addrsummary-detail { margin: 0; font-size: 13px; color: var(--mgk-text-3); }
.mgk-checkout__addrsummary-change { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--mgk-blue); text-decoration: underline; }
.mgk-checkout__addrpicker2 { margin-bottom: 16px; }
.mgk-checkout__addrpicker2[hidden] { display: none; }
.mgk-checkout__addrpicker2-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mgk-checkout__addrpicker2-title { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--mgk-text); font-family: 'Quicksand', var(--mgk-font); }
.mgk-checkout__addrpicker2-sub { margin: 0; font-size: 13px; color: var(--mgk-text-3); }
.mgk-checkout__addrpicker2-list { display: flex; flex-direction: column; gap: 10px; }
.mgk-checkout__addrpicker2-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--mgk-border); border-radius: var(--mgk-radius); background: var(--mgk-surface); }
.mgk-checkout__addrpicker2-item.is-sel { border-color: #1363FF; }
.mgk-checkout__addrpicker2-radio { flex: 0 0 auto; padding-top: 2px; }
.mgk-checkout__addrpicker2-radio input { width: 18px; height: 18px; accent-color: #1363FF; cursor: pointer; }
.mgk-checkout__addrpicker2-body { flex: 1 1 auto; min-width: 0; }
.mgk-checkout__addrpicker2-default { margin-bottom: 6px; }
.mgk-checkout__addrpicker2-block { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--mgk-text); }
.mgk-checkout__addrpicker2-who { margin: 0; font-size: 13px; color: var(--mgk-text-3); }
.mgk-checkout__addrpicker2-note { margin: 4px 0 0; font-size: 12px; font-style: italic; color: var(--mgk-text-3); }
.mgk-checkout__addrpicker2-actions { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mgk-checkout__addrpicker2-edit, .mgk-checkout__addrpicker2-delete { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.mgk-checkout__addrpicker2-edit svg, .mgk-checkout__addrpicker2-delete svg { display: block; flex: none; }
.mgk-checkout__addrpicker2-edit { color: #1363FF; }
.mgk-checkout__addrpicker2-delete { color: #F04438; }
.mgk-checkout__addrpicker2-addnew { background: #fff; color: #1363FF; border: 1.5px solid #1363FF; }
.mgk-checkout__addrform-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.mgk-checkout__addrform-err { color: var(--mgk-red); font-size: 13px; margin: 8px 0 0; }
.mgk-checkout__addrform-err[hidden] { display: none; }
/* Per-field variant (address-book popup): sits inside .mgk-field, right
   under that field's own input, instead of one shared line at the form's
   bottom — so it's obvious which field a validation error belongs to.
   Re-declares color/weight because .mgk-field > span (below) is a more
   specific selector than the plain .mgk-checkout__addrform-err rule above
   and would otherwise win, leaving this looking like a bold label instead
   of a red error. */
.mgk-field > .mgk-checkout__addrform-err { display: block; margin: 4px 0 0; color: var(--mgk-red); font-weight: 400; }
/* Address Book Edit/Add-new popup — same overlay+dialog pattern as
   .mgk-invoice (order invoice popup), its own namespace since it's a
   distinct feature (a small form, not a document viewer). */
.mgk-addrmodal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-addrmodal[hidden] { display: none; }
.mgk-addrmodal__backdrop { position: absolute; inset: 0; background: rgba(27,58,82,.55); backdrop-filter: blur(2px); }
.mgk-addrmodal__dialog { position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; gap: 0; background: #fff; border-radius: 24px; box-shadow: 0 10px 40px rgba(15, 23, 41, .121569); overflow: hidden; font-family: 'Quicksand', var(--mgk-font); }
.mgk-addrmodal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 32px 32px 20px; border-bottom: none; }
.mgk-addrmodal__title { font-family: 'Quicksand', var(--mgk-font); font-size: 20px; font-weight: 700; line-height: 25px; color: #061937; margin: 0; }
.mgk-addrmodal__x { background: #F6F8FB; border: none; cursor: pointer; width: 32px; height: 32px; border-radius: 16px; font-size: 15px; color: #8A9FB5; display: flex; align-items: center; justify-content: center; transition: background .15s; flex: 0 0 auto; }
.mgk-addrmodal__x:hover { background: var(--mgk-border); }
.mgk-addrmodal__body { overflow-y: auto; padding: 0 32px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.mgk-addrmodal__body .mgk-field { margin-bottom: 0; }
.mgk-addrmodal__body .mgk-field > span { font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 600; line-height: 18px; color: #061937; margin-bottom: 8px; }
.mgk-addrmodal__body .mgk-field > input,
.mgk-addrmodal__body .mgk-field textarea,
.mgk-addrmodal__body .mgk-field__phone-row { border: 1px solid #EFF2F6; border-radius: 12px; height: 48px; padding: 0 16px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; box-sizing: border-box; }
.mgk-addrmodal__body .mgk-field textarea { height: 90px; padding: 12px 16px; resize: none; }
/* The phone row IS a <span> inside .mgk-field, so `.mgk-addrmodal__body
   .mgk-field > span { display: block }` (two classes + element) outranks the
   `span.mgk-field__phone-row { display: flex }` base rule and collapsed the row:
   the "+65" prefix took a line of its own and the input wrapped underneath.
   Restate the flex row at modal specificity so it wins. */
.mgk-addrmodal__body .mgk-field > span.mgk-field__phone-row { display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
/* Fill the 48px row rather than sitting at its own 18px line-box height, so the
   text baseline and caret line up with the neighbouring Recipient Name field. */
.mgk-addrmodal__body .mgk-field__phone-row input { border: none; height: 100%; padding: 0; background: transparent; }
.mgk-addrmodal__body .mgk-field__phone-prefix { font-size: 14px; color: #061937; }
.mgk-addrmodal__body .mgk-field input::placeholder,
.mgk-addrmodal__body .mgk-field textarea::placeholder { color: #8A9FB5; }
.mgk-addrmodal__body .mgk-form__grid2 { gap: 16px; }
.mgk-addrmodal__hint { font-size: 12px; color: var(--mgk-text-2); margin: -8px 0 12px; }
.mgk-addrmodal__default { display: flex; align-items: center; gap: 12px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 500; color: #061937; cursor: pointer; margin: 0; }
/* `appearance: none` is required for the border/radius to render at all — with
   the native widget (appearance: auto) the browser draws its own square box and
   ignores both, which is why this showed as a sharp-cornered black-bordered
   square. The tick is drawn as a CSS mask so it inherits the brand blue. */
.mgk-addrmodal__default input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border: 1px solid #DCE5EA; border-radius: 6px; background: #fff; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.mgk-addrmodal__default input:checked { background: #1363FF; border-color: #1363FF; }
.mgk-addrmodal__default input:checked::after {
	content: ''; width: 14px; height: 14px; background: #fff;
	-webkit-mask: var(--mgk-tick) center / contain no-repeat;
	mask: var(--mgk-tick) center / contain no-repeat;
	--mgk-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.mgk-addrmodal__default input:focus-visible { outline: 2px solid #1363FF; outline-offset: 2px; }
.mgk-addrmodal__foot { display: flex; justify-content: flex-end; gap: 12px; padding: 24px 32px 32px; border-top: none; }
.mgk-addrmodal__foot .mgk-btn { min-width: 140px; height: 36px; padding: 7px 20px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 500; border-radius: 8px; }
.mgk-addrmodal__foot .mgk-btn--outline { background: #fff; color: #1363FF; border: 1px solid #1363FF; }
.mgk-addrmodal__foot .mgk-btn--blue, .mgk-addrmodal__foot .mgk-btn--teal { background: #1363FF; color: #fff; border: none; }

/* Address Book's Add/Edit address SCREEN (design: "Add new address"). Not an
   overlay — it's a normal in-flow view that replaces the list inside
   .mgk-profile__main, so no fixed positioning, backdrop or z-index here. The
   markup still carries Checkout's data-mgk-addr-modal-* hooks (one shared JS
   + validation implementation), which is why the inner body/foot keep their
   .mgk-addrmodal__* class names — only the outer chrome differs. */
.mgk-addrform[hidden] { display: none; }
/* Spacing/sizing below is the Figma spec verbatim. The spec's 771px container
   width is deliberately NOT applied: the form must span the same width as the
   address list it replaces, and the list simply fills .mgk-profile__main. 771
   is just how wide that column happened to be in the mockup's viewport — the
   two-column rows stay balanced at any width since they're 1fr each.
   Outer gap 20px, bottom padding 24px, no top/side padding. */
.mgk-addrform { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 0 0 24px; font-family: 'Quicksand', var(--mgk-font); }
/* Title row: 28px tall, arrow 24px, 8px gap, H4/Bold 20/28 #1B3A52. */
.mgk-addrform__head { display: flex; flex-direction: row; align-items: center; gap: 8px; height: 28px; }
.mgk-addrform__back { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: none; background: none; color: #292D32; cursor: pointer; }
.mgk-addrform__back svg { width: 24px; height: 24px; }
.mgk-addrform__title { margin: 0; flex: 1 1 auto; font-family: 'Quicksand', var(--mgk-font); font-size: 20px; font-weight: 700; line-height: 28px; color: #1B3A52; letter-spacing: normal; }
/* Card: 20px padding all round, 20px gap between the form section and the
   footer actions, border #D5E2EE, radius 16. The 20px side padding lives on
   the card itself, so the body/foot below run edge-to-edge inside it. */
.mgk-addrform__card { box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; background: #fff; border: 1px solid #D5E2EE; border-radius: 16px; }
/* Form-Section: 16px between rows. The body/foot were written for a scrolling
   dialog with its own 32px side padding — both are reset here since the card
   now supplies the padding and the page (not the body) scrolls. */
.mgk-addrform__card .mgk-addrmodal__body { overflow: visible; padding: 0; gap: 16px; }
.mgk-addrform__card .mgk-addrmodal__foot { padding: 0; gap: 12px; }
/* Field: label 14/18 600 #061937, 8px above a 48px input with 16px side
   padding, border #EFF2F6, radius 12. These restate the shared
   .mgk-addrmodal__body values at higher specificity so the earlier
   scaled-up overrides are fully undone. */
.mgk-addrform .mgk-addrmodal__body .mgk-field > span { font-size: 14px; font-weight: 600; line-height: 18px; color: #061937; margin-bottom: 8px; }
.mgk-addrform .mgk-addrmodal__body .mgk-field > input,
.mgk-addrform .mgk-addrmodal__body .mgk-field textarea { border: 1px solid #EFF2F6; border-radius: 12px; height: 48px; padding: 0 16px; font-size: 14px; font-weight: 400; line-height: 18px; color: #061937; }
.mgk-addrform .mgk-addrmodal__body .mgk-field input::placeholder,
.mgk-addrform .mgk-addrmodal__body .mgk-field textarea::placeholder { color: #8A9FB5; }
.mgk-addrform .mgk-addrmodal__body .mgk-field > input:focus,
.mgk-addrform .mgk-addrmodal__body .mgk-field textarea:focus { outline: none; border-color: #1363FF; }
.mgk-addrform .mgk-addrmodal__body .mgk-form__grid2 { gap: 16px; }
/* Required-field marker — the design's red asterisk after the label text. */
.mgk-addrform .mgk-field__req { color: #F04438; font-style: normal; }
/* Positioning context for the suggestions dropdown (.mgk-autocomplete) that
   the Postal code field opens while typing. No caret rule any more — the field
   is a text input, not a select, so the chevron was removed along with the
   40px right padding that had been reserved for it. */
.mgk-addrform .mgk-field--autocomplete { position: relative; }
/* "Note": 90px box, 12px/16px padding, full row width. .mgk-field only gives
   `width: 100%` to input, so without this the textarea sizes itself from its
   default `cols` attribute instead of filling the row. */
.mgk-addrform .mgk-addrmodal__body .mgk-field textarea { display: block; width: 100%; height: 90px; padding: 12px 16px; }
/* Checkbox row: 24px box, 12px gap, 14/18 500 label. */
.mgk-addrform .mgk-addrmodal__default { gap: 12px; font-size: 14px; font-weight: 500; line-height: 18px; }
.mgk-addrform .mgk-addrmodal__default input { width: 24px; height: 24px; border-radius: 6px; }
/* Buttons: 140×36, 7px/20px padding, radius 8, 14/22. Save's #94BFFF fill is
   its DISABLED state (the form opens empty) — the save handler toggles it,
   and it returns to the solid brand blue once the required fields are in. */
.mgk-addrform .mgk-addrmodal__foot .mgk-btn { min-width: 140px; height: 36px; padding: 7px 20px; font-size: 14px; font-weight: 500; line-height: 22px; border-radius: 8px; }
.mgk-addrform .mgk-addrmodal__foot .mgk-btn--blue:disabled { background: #94BFFF; font-weight: 400; cursor: not-allowed; }
@media (max-width: 640px) {
	.mgk-addrform__card { padding: 16px; }
	.mgk-addrform .mgk-addrmodal__foot .mgk-btn { min-width: 0; flex: 1 1 0; }
	.mgk-addrform__title { font-size: 18px; line-height: 24px; }
}
/* "Address saved" confirmation popup (mgk-storefront.js, shown after
   mgk_address_save succeeds) — same backdrop as .mgk-addrmodal, but the
   card itself reuses .mgk-success__* (order-success.php) verbatim since the
   design is that same check-icon/heading/recap/button layout with only the
   copy swapped; only the two-line recap needs its own row layout since a
   name+phone / address pair reads better stacked than the label-left
   value-right rows .mgk-success__recap-row was built for. */
.mgk-addrsaved { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-addrsaved[hidden] { display: none; }
.mgk-addrsaved__card { position: relative; z-index: 1; }
.mgk-addrsaved__card .mgk-success__recap-row { justify-content: flex-start; }
.mgk-addrsaved__who { font-weight: 700; color: var(--mgk-text); text-align: left; }
.mgk-addrsaved__detail { color: var(--mgk-text-3); text-align: left; }

/* Delete-confirm popup (mgk-storefront.js, data-mgk-addr-delete) — same
   backdrop as .mgk-addrmodal, but a small standalone card (not the
   fullscreen .mgk-success__* layout) since the reference design here is
   a compact centered dialog: title, 2-line message, Cancel + Delete. */
.mgk-addrdel { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-addrdel[hidden] { display: none; }
.mgk-addrdel__card { position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--mgk-surface); border-radius: var(--mgk-radius); box-shadow: var(--mgk-shadow-lg); padding: 32px; text-align: center; }
.mgk-addrdel__icon { width: 64px; height: 64px; margin: 0 auto 20px; flex: 0 0 auto; }
.mgk-addrdel__title { font-size: 22px; font-weight: 800; color: var(--mgk-text); margin: 0 0 12px; }
.mgk-addrdel__msg { font-size: 14px; line-height: 1.5; color: var(--mgk-text-3); margin: 0 0 24px; }
/* Buttons match the address form's own footer pair (#1363FF, 36px tall,
   radius 8, 14/22 500) rather than the older --mgk-blue (#1565C0) they used
   to carry — the two dialogs sit one click apart on the same screen, so the
   mismatched blues read as a bug. Shared by Address Book, Payment Method and
   Checkout, which all reuse .mgk-addrdel. */
.mgk-addrdel__actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.mgk-addrdel__actions .mgk-btn { flex: 1 1 0; height: 36px; padding: 7px 20px; font-size: 14px; font-weight: 500; line-height: 22px; border-radius: 8px; }
.mgk-addrdel__cancel { background: #fff; color: #1363FF; border: 1px solid #1363FF; }
.mgk-addrdel__confirm { background: #1363FF; color: #fff; border: none; }
/* Deleting the DEFAULT address/card: an amber banner above the buttons, plus
   (when other rows survive) a radio list that must be answered before Delete
   unlocks. Both blocks are `hidden` in the markup and revealed by the JS only
   for the default row, so an ordinary delete still shows the plain 3-line
   dialog above. Left-aligned inside an otherwise centered card — a warning
   paragraph and a list of addresses both read badly centered. */
.mgk-addrdel__warn { display: flex; align-items: flex-start; gap: 10px; text-align: left; margin: 0 0 20px; padding: 12px 14px; border: 1px solid #FDBA74; border-radius: 8px; background: #FFF7ED; }
.mgk-addrdel__warn-icon { flex: 0 0 auto; font-size: 16px; line-height: 1.4; color: #C2410C; }
.mgk-addrdel__warn-text { margin: 0; font-size: 13px; line-height: 1.5; color: #9A3412; }
.mgk-addrdel__warn[hidden], .mgk-addrdel__pick[hidden] { display: none; }
.mgk-addrdel__pick { text-align: left; margin: 0 0 20px; }
.mgk-addrdel__pick-label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--mgk-text); }
/* Capped + scrollable: a user with a dozen saved addresses must not push the
   Delete/Cancel pair off-screen. */
.mgk-addrdel__pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 168px; overflow-y: auto; }
.mgk-addrdel__pick-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--mgk-border); border-radius: 8px; cursor: pointer; }
.mgk-addrdel__pick-item:has(input:checked) { border-color: #1363FF; background: #F5F9FF; }
.mgk-addrdel__pick-item input { margin: 2px 0 0; flex: 0 0 auto; accent-color: #1363FF; }
.mgk-addrdel__pick-body { display: block; min-width: 0; }
.mgk-addrdel__pick-title { display: block; font-size: 13px; font-weight: 600; color: var(--mgk-text); }
.mgk-addrdel__pick-meta { display: block; font-size: 12px; line-height: 1.45; color: var(--mgk-text-3); overflow-wrap: anywhere; }
/* The gate itself — Delete stays visibly inert until a new default is picked
   (or the API call is in flight). :disabled also covers the in-flight state
   every one of these dialogs already sets. */
.mgk-addrdel__confirm:disabled { background: #A9C6FF; cursor: not-allowed; }
.mgk-qty { display: inline-flex; align-items: center; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); overflow: hidden; }
.mgk-qty__btn { background: none; border: none; cursor: pointer; font-weight: 700; font-size: 16px; padding: 8px 14px; color: var(--mgk-text); }
.mgk-qty__val { padding: 8px 14px; font-weight: 700; font-size: 14px; border-left: 1px solid var(--mgk-border); border-right: 1px solid var(--mgk-border); }
/* ui-retail S-007 spec (cart.svg "Stepper" component): the cart row's own
   qty control reads as a filled pill (bg #F4F6F9, no divider borders),
   distinct from the bordered .mgk-qty used elsewhere on the site. */
.mgk-cartrow__controls .mgk-qty { border: none; background: #F4F6F9; border-radius: 10px; }
.mgk-cartrow__controls .mgk-qty__val { border: none; background: none; }
.mgk-field { display: block; margin-bottom: 12px; }
.mgk-field > span { display: block; font-size: 13px; font-weight: 600; color: var(--mgk-text); margin-bottom: 4px; }
.mgk-field input { width: 100%; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 9px 12px; font-size: 14px; font-family: inherit; color: var(--mgk-text); background: var(--mgk-surface); }
.mgk-field input.mgk-field--err { border-color: #b3261e; background: #fce8e6; }
/* Required-field / zone-coverage validation (mgk-storefront.js checkoutGateOk
   flow) toggles the shared .is-invalid class straight onto the <input> — same
   class the profile page already styles red. Needed here (unscoped, so it
   also reaches desktop) because the funnel-only mobile copy of this rule
   further down the file lives inside `@media (max-width: 640px)` and never
   applied above that breakpoint. Phone is a special case: its border lives on
   the `span.mgk-field__phone-row` wrapper, not the (border:0) input inside
   it, so the red state has to key off `:has(input.is-invalid)` on that row. */
.mgk-field input.is-invalid { border-color: var(--mgk-red); background: #FEF3F2; }
.mgk-field input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(232, 80, 64, .12); }
span.mgk-field__phone-row:has(input.is-invalid) { border-color: var(--mgk-red); background: #FEF3F2; }
.mgk-field__note { font-weight: 400; color: var(--mgk-text-3); }
.mgk-field--phone { min-width: 0; }
/* `span.mgk-field__phone-row` (not the bare class): the row IS a <span> and a
   direct child of .mgk-field, so the generic `.mgk-field > span { display: block }`
   above matches it at equal specificity and — being declared later — was winning.
   That collapsed the row to a block, dropping the flex centring: the "+65" prefix
   sat at the top-left and the input shrank to its 18px line box inside a 48px
   row. The element-qualified selector outranks it. */
span.mgk-field__phone-row { display: flex; align-items: center; gap: 6px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); padding-left: 12px; min-width: 0; }
.mgk-field__phone-prefix { flex: 0 0 auto; font-size: 14px; color: var(--mgk-text-2); }
.mgk-field__phone-row input { flex: 1 1 auto; width: auto; min-width: 0; border: none; background: transparent; padding-left: 0; }
.mgk-field__phone-row input:focus { outline: none; }
.mgk-field__phone-row:focus-within { border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-checkout__err { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--mgk-radius-sm); background: #fce8e6; border: 1px solid #f3b9b3; color: #b3261e; font-size: 13px; }
.mgk-checkout__err strong { display: block; font-weight: 700; margin-bottom: 6px; }
.mgk-checkout__err ul { margin: 0; padding-left: 18px; }
.mgk-checkout__err li { margin: 2px 0; }
.mgk-form__grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mgk-radio { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--mgk-text-2); margin-bottom: 8px; }
.mgk-radio input { accent-color: var(--mgk-navy); }
.mgk-optcard { display: flex; flex-direction: row; align-items: center; gap: 10px; text-align: left; padding: 14px 16px; border: 2px solid var(--mgk-border); border-radius: var(--mgk-radius); background: var(--mgk-surface); cursor: pointer; font-family: inherit; }
.mgk-optcard.is-sel { border-color: #1363FF; background: #EFF4FE; }
.mgk-optcard__icon { flex: 0 0 auto; font-size: 24px; display: flex; }
.mgk-optcard__icon svg { display: block; width: 24px; height: 24px; }
.mgk-optcard__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mgk-optcard__label { display: block; font-size: 14px; font-weight: 600; color: var(--mgk-text); }
.mgk-optcard__desc { display: block; font-size: 12px; color: var(--mgk-text-3); }
.mgk-optcard__note { font-size: 10px; color: var(--mgk-teal); font-family: monospace; margin-top: 2px; }
.mgk-gst { display: flex; flex-direction: column; gap: 8px; font-size: 14px; margin: 4px 0 16px; }
.mgk-gst__row { display: flex; justify-content: space-between; color: var(--mgk-text-2); }
/* A row with the `hidden` attr (zero delivery / zero discount) must stay hidden —
   the flex rule above would otherwise override the UA [hidden]{display:none}. */
.mgk-gst__row[hidden] { display: none !important; }
/* Combined discount row ("Discount (N vouchers) −S$X") + its small inline ✕
   remove-all button. Only the amount is tinted green — the "Discount (N
   vouchers)" label stays the row's normal (non-discount) text color, matching
   every other Order Summary row instead of standing out on its own. */
.mgk-gst__row--discount [data-mgk-sum-discount], .mgk-gst__row--discount [data-mgk-sum-private-discount], .mgk-gst__row--discount [data-mgk-voucher-line] > span:last-child { color: #22A86B; font-weight: 700; }
.mgk-gst__row-note { font-size: 11px; font-weight: 400; font-style: italic; color: var(--mgk-text-3); }
.mgk-gst__row-note[hidden] { display: none; }
.mgk-gst__remove {
	appearance: none; border: 0; background: transparent; cursor: pointer;
	color: var(--mgk-text-3, #90a0a8); font-size: 12px; line-height: 1;
	padding: 2px 4px; margin-left: 2px; border-radius: 4px; vertical-align: middle;
	transition: color .15s ease, background .15s ease;
}
.mgk-gst__remove:hover { color: #c0392b; background: rgba(192,57,43,.1); }
.mgk-gst__remove:disabled { opacity: .5; cursor: default; }

/* Toast (voucher apply, add-to-cart, errors). storefront.js builds
   .mgk-toast[.mgk-toast--error] and toggles .is-in; without these styles the
   feedback was invisible, so a rejected voucher looked like "nothing happened". */
.mgk-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
	z-index: 100000; max-width: min(92vw, 420px);
	display: flex; align-items: flex-start; gap: 10px;
	background: var(--mgk-navy-800, #12263f); color: #fff;
	font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center;
	padding: 12px 20px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.22);
	opacity: 0; transition: opacity .25s ease, transform .25s ease;
	/* The dismiss × needs clicks; the toast used to be pointer-events:none as a
	   whole because it carried no controls. */
	pointer-events: auto;
}
.mgk-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
/* Desktop keeps the single dark pill it always had — only the red error variant
   is distinguished, and the ✓/! badge stays hidden. The mockup's three tinted
   kinds are a phone treatment (§ 317). */
.mgk-toast--error,
.mgk-toast--err { background: #c0392b; }
.mgk-toast__mark { display: none; }
.mgk-toast__msg { flex: 1 1 auto; }
.mgk-toast__x {
	flex: 0 0 auto; border: none; background: none; padding: 2px 4px;
	color: inherit; font-size: 16px; line-height: 1; cursor: pointer;
}
.mgk-gst__total { display: flex; justify-content: space-between; font-weight: 700; color: var(--mgk-text); padding-top: 2px; margin-top: -2px; font-size: 18px; }
/* Tax/GST is grouped with the Total below it, not with Subtotal/Delivery/
   Service charge/Discount above — the divider sits above this row, not
   between it and Total. */
.mgk-gst__row--tax { padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--mgk-border); }
/* Unused modifier for a Total row with no .mgk-gst__row--tax above it to
   carry the divider — every summary (cart, checkout) now has its own GST
   row, so this hasn't had a caller since cart-summary.php gained one. Left
   defined in case a future summary variant genuinely has no tax row. */
.mgk-gst__total--bordered { padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--mgk-border); }
.mgk-gst__note { font-size: 11px; color: var(--mgk-text-3); margin: 0; }
/* Mixed-cart tax caption (§3.5) — sits under the blanket tax notice and only
   appears when the cart holds more than one tax treatment. */
.mgk-gst__note--mixed { margin-top: 2px; }
.mgk-gst__note--mixed[hidden] { display: none; }
.mgk-sumitems { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.mgk-sumitems__row { display: flex; align-items: center; gap: 10px; }
.mgk-sumitems__thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border: 1px solid var(--mgk-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
body .mgk-sumitems__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-sumitems__body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mgk-sumitems__name { font-size: 12px; font-weight: 600; color: var(--mgk-text); }
.mgk-sumitems__qty { color: var(--mgk-text-3); font-weight: 400; }
.mgk-sumitems__line { font-size: 12px; font-weight: 700; color: var(--mgk-navy); }
/* Per-item promo chip (ui-retail checkout.css "FRESH10" — 10% off first order) —
   only rendered when mgk_core_filter_payment_data()'s items carry discount_pct. */
.mgk-sumitems__chip { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--mgk-green, #22A86B); background: rgba(34,168,107,.125); border-radius: 4px; padding: 2px 8px; }
/* Per-line tax treatment chip (MGK-SPEC-TAX §3.5). Neutral/informational, NOT
   promotional — it must not compete with the green discount chip above. Only
   rendered for non-standard lines (zero-rated / exempt / not taxable), which the
   spec requires to stay visually distinct from one another. */
.mgk-sumitems__taxchip { display: inline-block; align-self: flex-start; margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; border-radius: 4px; padding: 2px 8px; color: var(--mgk-text-2, #5C7089); background: rgba(92,112,137,.12); }
.mgk-sumitems__taxchip--zero-rated { color: #1D6FA5; background: rgba(29,111,165,.12); }
.mgk-sumitems__taxchip--exempt { color: #8A6100; background: rgba(138,97,0,.12); }
/* checkou.svg spec: a single compact text line ("Cart ——— Checkout ———
   Confirmation"), not the dot-and-bar timeline used elsewhere — this
   component is only used by the merged Checkout page, so restyle in place.
   Sits as its own row inside .mgk-checkout__main, above the "Returning
   customer?" banner — the header row itself (brand/secure) is unchanged for
   every user. */
.mgk-stepper { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-family: 'Quicksand', var(--mgk-font); font-size: 12.5px; font-weight: 600; color: #8A9FB5; }
.mgk-stepper__label { color: #8A9FB5; }
.mgk-stepper__label.is-active { color: #061937; font-weight: 700; }
.mgk-stepper__bar { color: #8A9FB5; letter-spacing: -1px; }
.mgk-timeline { display: flex; flex-direction: column; }
.mgk-timeline__step { display: flex; gap: 12px; }
.mgk-timeline__rail { display: flex; flex-direction: column; align-items: center; }
.mgk-timeline__dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; border: 2px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text-3); flex-shrink: 0; }
.mgk-timeline__dot--done { background: var(--mgk-green); border-color: var(--mgk-green); color: #fff; }
.mgk-timeline__dot--current { background: var(--mgk-navy); border-color: var(--mgk-navy); color: #fff; }
.mgk-timeline__bar { width: 2px; flex: 1; min-height: 28px; background: var(--mgk-border); }
.mgk-timeline__bar.is-done { background: var(--mgk-green); }
.mgk-timeline__body { padding: 2px 0 12px; }
.mgk-timeline__label { font-size: 14px; font-weight: 600; color: var(--mgk-text-3); margin: 0; }
.mgk-timeline__label.is-active { color: var(--mgk-text); }
.mgk-timeline__time { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-timeline__ord { display: contents; }

/* S-015 variant (Order Tracking comp): every dot is the same 24px ring with a
   filled 12px core — Blue Ribbon (--mgk-track-blue, #1363FF, inherited from
   .mgk-track) once the step is reached, pale slate (#D5E2EE) while pending — and
   no glyph inside it. The literal fallback keeps the blue correct if this
   timeline is ever used outside .mgk-track. The ordinal/✓ stays in the
   DOM (the live poller rewrites .mgk-timeline__ord) but is hidden here, so a
   status refresh can't reintroduce a number into the comp's clean dot.
   Scoped to --track so the numbered timeline on other screens is untouched. */
.mgk-timeline--track { padding-top: 16px; }
.mgk-timeline--track .mgk-timeline__step { gap: 12px; align-items: stretch; }
.mgk-timeline--track .mgk-timeline__dot {
	width: 24px; height: 24px; border-width: 3px; background: var(--mgk-surface);
	border-color: #D5E2EE; box-shadow: inset 0 0 0 3px var(--mgk-surface);
}
.mgk-timeline--track .mgk-timeline__dot--done,
.mgk-timeline--track .mgk-timeline__dot--current {
	background: var(--mgk-track-blue, #1363FF); border-color: var(--mgk-track-blue, #1363FF);
}
.mgk-timeline--track .mgk-timeline__ord { display: none; }
/* Rail: the connector runs blue down to and including the current step, then
   pale — mirroring the dots so the "how far along" read is one continuous line. */
.mgk-timeline--track .mgk-timeline__bar { width: 2px; min-height: 24px; background: #D5E2EE; }
.mgk-timeline--track .mgk-timeline__bar.is-done,
.mgk-timeline--track .mgk-timeline__dot--current + .mgk-timeline__bar { background: var(--mgk-track-blue, #1363FF); }
/* Step text — bold navy label over a small grey estimate (comp Body M/Bold +
   Body S/Medium). Every label is full-strength navy here, reached or not. */
.mgk-timeline--track .mgk-timeline__body { padding: 2px 0 12px; }
.mgk-timeline--track .mgk-timeline__label,
.mgk-timeline--track .mgk-timeline__label.is-active { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--mgk-navy); }
.mgk-timeline--track .mgk-timeline__time { font-size: 12px; line-height: 16px; font-weight: 500; color: #A1A1A1; }
.mgk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mgk-slot { padding: 10px 8px; border-radius: var(--mgk-radius-sm); border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.mgk-slot.is-full { background: var(--mgk-bg-alt); color: var(--mgk-text-3); cursor: not-allowed; }
.mgk-slot.is-sel { background: var(--mgk-navy); border-color: var(--mgk-navy); color: #fff; }

/* ── 015 Campaign Hero ─────────────────────────────────────── */
.mgk-camphero { position: relative; min-height: 256px; display: flex; align-items: center; overflow: hidden; background: linear-gradient(135deg, #8B1A1A 40%, #b33 100%); }
.mgk-camphero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(139,26,26,.92) 40%, rgba(139,26,26,.5) 100%); }
.mgk-camphero__inner { position: relative; z-index: 1; max-width: var(--mgk-maxw); width: 100%; margin: 0 auto; padding: 32px var(--mgk-pad-x); }
.mgk-camphero__badge { margin-bottom: 12px; }
.mgk-camphero__heading { color: #fff; font-size: 30px; font-weight: 900; margin: 0 0 8px; }
.mgk-camphero__sub { color: rgba(255,255,255,.85); font-size: 14px; line-height: 1.6; margin: 0 0 16px; max-width: 520px; }
.mgk-camphero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── 016 Collection Tabs ───────────────────────────────────────────────
   Category Landing "TabsRow" (Figma): a 64px white band holding the chip row
   on the left and the sort dropdown on the right. Chips are 40px pills —
   #F1F5F9 / Quicksand SemiBold 14/20 #1B3A52 — and the ACTIVE chip inverts to
   the navy fill with a white count badge beside its label.

   Spec heights: band 64 = 12px padding + 40px chip + 12px. Chip padding is
   10px 18px, which with 14/20 text makes the 40px exactly.

   The strip still scrolls horizontally rather than wrapping: this store has 11
   shelves against the mockup's 7, so at narrower desktop widths the row must
   slide instead of growing a second line and pushing the grid down. */
.mgk-coltabs { background: var(--mgk-surface); }
/* Full-bleed like the sections below it (see .mgk-section.mgk-shop). This is the
   FIRST band on Category Landing / Search Results, and it kept the centred
   --mgk-maxw column after those sections went full-bleed: measured at 2560px it
   sat L=560/R=560 while .mgk-shop underneath ran L=0/R=0, so the page opened
   with a visible step in the left margin.
   It is an INNER-wrapper pattern (.mgk-coltabs is the full-width band, __inner
   holds the column) rather than a .mgk-section, which is why the section-scoped
   full-bleed rule near .mgk-flashwrap does not reach it. Same 24px side pad via
   --mgk-pad-x, so the chips line up with the product cards below.
   The ~640px block far below already restates max-width:none/width:100%/margin:0
   for the phone skin, so its own right-edge-bleed treatment is unaffected. */
.mgk-coltabs__inner { box-sizing: border-box; max-width: none; margin: 0; padding: 12px var(--mgk-pad-x); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* Only the chips scroll — the sort control stays pinned at the right edge. */
.mgk-coltabs__tabs { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-x: auto; }
/* TWO widgets share .mgk-coltabs with DIFFERENT markup:
     pages/category-list-tabs.php → __inner > __tabs > __tab   (has a wrapper)
     pages/collection-tabs.php    → __inner > __tab            (no wrapper)
   The rule above hands the scrolling to the wrapper, so on the wrapper-less
   variant (Flash Deals, /fresh-deal/) nothing owned it: this store has 9
   category chips needing 1632px, and with no scroller they pushed the DOCUMENT
   to 1632px inside a 1280px window. The last two chips ("Beverages",
   "Household Essentials") sat off-screen and unreachable, and the whole page —
   header and hero included — gained a horizontal scrollbar.
   :has(> .mgk-coltabs__tab) matches ONLY the wrapper-less markup (a chip as a
   DIRECT child is its structural signature), so __inner becomes the scroller
   there while the wrapper case above is left untouched. Same technique already
   used for the phone at the ~640px block; this is its desktop half.
   min-width:0 is required, not decorative: __inner is a flex item, and a flex
   item's automatic minimum size is its content, which would keep the box at
   1632px and re-create the overflow even with overflow-x set. */
.mgk-coltabs__inner:has(> .mgk-coltabs__tab) { min-width: 0; overflow-x: auto; }
.mgk-coltabs__tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: none; border-radius: 999px; background: var(--mgk-bg-alt); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 20px; color: var(--mgk-navy); cursor: pointer; white-space: nowrap; text-decoration: none; }
.mgk-coltabs__tab:hover { background: #E2E8F0; }
.mgk-coltabs__tab.is-active { background: var(--mgk-navy); color: #fff; font-weight: 700; }
.mgk-coltabs__tab.is-active:hover { background: var(--mgk-navy); }
/* Count pill — white on the navy chip, so it only ever renders on the active
   one (the template emits it there alone). */
.mgk-coltabs__count { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 20px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: #fff; color: var(--mgk-navy); font-size: 12px; font-weight: 700; line-height: 16px; }
/* Sort: a 32px bordered box, 12/16 SemiBold, with our own caret — the native
   arrow is unstyleable, so it is removed and the SVG positioned in its place.
   The caret is positioned against the <label>, so its `right` is an inset from
   the BORDER, not from the select's padding box: at right:12px the 10px glyph
   sat 12px from the edge and read as wedged against it. right:10px + a 32px
   padding gutter (10 inset + 10 glyph + 12 clear of the label text) matches the
   optical breathing room .mgk-seasoncamp__select already uses. */
.mgk-coltabs__sort { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; }
.mgk-coltabs__sort-select { -webkit-appearance: none; appearance: none; box-sizing: border-box; height: 32px; padding: 0 32px 0 12px; background: var(--mgk-surface); border: 1px solid #D5E2EE; border-radius: 6px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--mgk-navy); cursor: pointer; }
.mgk-coltabs__sort-select:focus-visible { outline: 2px solid var(--mgk-cta-blue); outline-offset: 1px; }
.mgk-coltabs__sort-caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
/* ── Phone-only elements, all switched on in the Batch 1 <=640px skin ──
   Declared HERE, ahead of that media block, deliberately: these are all
   single-class selectors, so a base rule placed AFTER the media query would
   win on source order and keep the element hidden at every width. */
/* Categories chip strip: leading burger glyph + per-category emoji. */
.mgk-coltabs__burger, .mgk-coltabs__icon { display: none; }
/* The "All Categories" chip is phone-only too — the desktop design's strip is
   category chips and nothing else. Kept in the DOM (not dropped from the
   template) because the phone skin turns it into the mockup's burger glyph. */
.mgk-coltabs__tab--all { display: none; }
/* Flash Deals: the red title band that replaces the banner photo on a phone,
   and the countdown's "Ends in" label. */
.mgk-sale__mhero, .mgk-sale__endsin { display: none; }

/* ── 017 Hamper Grid ───────────────────────────────────────── */
.mgk-hamper { background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); overflow: hidden; }
.mgk-hamper__media { position: relative; height: 144px; background: var(--mgk-amber-bg); overflow: hidden; }
/* Full-bleed desktop: the section no longer stops at 1440px, so the two
   non-pinned hamper cards keep widening with the viewport (437px @1440 ->
   677 @1920 -> 997 @2560) while height:144px stayed put — the photo well
   stretched from ratio 3.03 to 6.92 and read as a letterbox strip. Hold the
   design SHAPE instead: 437/144 at the 1440px frame is ~3.03, so 91/30.
   min-height keeps the well from collapsing on a narrow column.
   Scoped to :not(:first-child) — the first card's media is deliberately pinned
   to a fixed 480x300 (see the min-width:1141px block below) and must not get a
   width-derived height. Gated to the same >=1141px range as that pin so the
   tablet/phone skins keep their own fixed wells. */
@media (min-width: 1141px) {
	.mgk-hampers .mgk-grid > .mgk-hamper:not(:first-child) .mgk-hamper__media {
		height: auto;
		aspect-ratio: 91 / 30;
		min-height: 108px;
	}
}
body .mgk-hamper__media img.mgk-hamper__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-hamper__img--ph { display: flex; align-items: center; justify-content: center; font-size: 42px; }
.mgk-hamper__badge { position: absolute; top: 8px; left: 8px; background: rgba(139,26,26,.9); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.mgk-hamper__body { padding: 16px; }
.mgk-hamper__name { font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-hamper__items { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 12px; }
.mgk-hamper__foot { display: flex; align-items: center; justify-content: space-between; }
.mgk-hamper__price { color: var(--mgk-green); font-weight: 900; }

/* FIRST hamper on the Fresh Deal page — its PHOTO is hard-fixed to 480x300px.
   Only the media well is pinned; the CARD keeps its normal grid-driven width and
   its auto height, so it simply grows taller to hold the taller photo. The base
   .mgk-hamper__media rule above is height:144px with no width (it fills the
   card), so both axes are restated here.
   All three axes pinned (width/height plus min/max): the media box is a flex/grid
   descendant whose bare width/height can still be resized by the card's own
   stretch, and min/max at the same value is what actually holds 480x300.
   The img inside already has width/height:100% + object-fit:cover (see the
   `body .mgk-hamper__media img` rule), so the photo CROPS to this box — the
   source file's dimensions never change the rendered size, same approach as the
   sale-tag strip.
   Gated at >=1141px: below that the content column narrows and the grid drops to
   2 then 1 column, where a rigid 480px photo is wider than its own card (and at
   720px wider than most of the viewport). 1141px is the existing --mgk-maxw step
   (see the 1140px query), so the pin releases exactly where the layout stops
   being able to hold it. The 640px block near .mgk-hampers restates the release
   for the phone skin, which sets its own 108px media height. */
@media (min-width: 1141px) {
.mgk-hampers .mgk-grid > .mgk-hamper:first-child .mgk-hamper__media {
	width: 480px;  min-width: 480px;  max-width: 480px;
	height: 300px; min-height: 300px; max-height: 300px;
	/* Base rule already clips (border-radius); explicit at the fixed size so an
	   oversized photo is cropped to the box rather than stretching it. */
	overflow: hidden;
}
/* The photo is now wider than the 1fr cell the card would get (~440px at
   1440px), so give the first column the photo's width PLUS the card's 1px
   left+right border = 482px. Sizing the column at a bare 480px makes the card
   480px wide but its CONTENT box only 478px, so the 480px photo spilled 2px past
   the border and .mgk-hamper's overflow:hidden clipped it — the photo rendered
   478px visible, not the 480 asked for. 482px is what makes the photo itself
   land on exactly 480. The other two columns share what's left. */
.mgk-hampers .mgk-grid--3:has(> .mgk-hamper:first-child) {
	grid-template-columns: 482px repeat(2, 1fr);
}
} /* end min-width: 1141px — first-hamper PHOTO 480x300 pin */

/* ── 018 PDP ───────────────────────────────────────────────── */
.mgk-pdp__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: start; }
.mgk-pdp__media { display: flex; flex-direction: column; gap: 12px; }
.mgk-pdp__main { position: relative; height: 340px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); overflow: hidden; }
body .mgk-pdp__main img.mgk-pdp__main-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-pdp__main-img--ph { display: flex; align-items: center; justify-content: center; font-size: 72px; background: var(--mgk-bg-alt); }
.mgk-pdp__media-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
/* Out-of-stock dim, same overlay formula as .mgk-prod__oos (shop grid card) —
   painted before .mgk-pdp__media-badges/-tags in the DOM so those still read
   full-strength on top of the dimmed photo. */
.mgk-pdp__oos { position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; }
/* Storage/cold-chain + certification overlay, bottom-left of the main photo —
   frosted pill so it reads over any product photo, distinct from the dietary
   $badges chips (top-left). */
.mgk-pdp__media-tags { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 24px); }
.mgk-pdp__media-tag { display: inline-flex; align-items: center; background: rgba(17, 24, 39, .55); backdrop-filter: blur(3px); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.3; padding: 5px 10px; border-radius: 999px; }
.mgk-pdp__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mgk-pdp__thumb { position: relative; height: 64px; border: 2px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); overflow: hidden; }
.mgk-pdp__thumb.is-active { border-color: var(--mgk-navy); }
.mgk-pdp__thumb-oos { position: absolute; inset: 0; background: rgba(255,255,255,.8); }
body .mgk-pdp__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* PDP "Part of <Collection> Collection" strip — sits directly under the fixed
   header (see template-parts/sections/pages/pdp-collection-strip.php), same
   dark-navy full-bleed convention as .mgk-marquee but a static announcement
   bar rather than a scrolling ticker. */
.mgk-pdp-collection-strip { display: flex; align-items: center; justify-content: center; gap: 8px 20px; flex-wrap: wrap; background: linear-gradient(90deg, var(--mgk-navy-900), #123a6b); color: #fff; padding: 12px 24px; font-size: 14px; text-align: center; }
.mgk-pdp-collection-strip__text { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mgk-pdp-collection-strip__sep { color: rgba(255,255,255,.5); }
.mgk-pdp-collection-strip__link { color: #fff; font-weight: 600; text-decoration: underline; white-space: nowrap; }

.mgk-pdp__info { display: flex; flex-direction: column; gap: 16px; }
.mgk-pdp__name { font-size: 22px; font-weight: 800; color: var(--mgk-text); margin: 0; }
.mgk-pdp__sku { font-size: 13px; color: var(--mgk-text-3); margin: 0; }
/* ui-retail S-005 spec: price + primary CTA use the design's "primary ver 3"
   blue (#1454B8) rather than the site-wide teal accent used elsewhere. */
.mgk-pdp__price { color: #1454B8; font-size: 36px; font-weight: 900; }
.mgk-pdp__price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.mgk-pdp__price-main { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
/* Was-price stacked above the GST disclosure, left-aligned, right next to
   the main price. Shown at EVERY width, unlike the rest of the phone-only
   additions — prices here are GST-inclusive, and saying so beside the price
   is a statutory display requirement, not a design flourish. */
.mgk-pdp__price-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.mgk-pdp__gstline { margin: 0; font-size: 12.5px; color: var(--mgk-text-3); }
.mgk-pdp__price-was { font-size: 16px; color: var(--mgk-text-3); text-decoration: line-through; }
.mgk-chip--sale { background: var(--mgk-red); color: #fff; border: 1px solid var(--mgk-red); font-weight: 900; }
/* Flash-sale price block (everywhere a product is on an event sale, except
   Fresh Deals which keeps its own existing red-hero look): the price itself
   turns red/orange instead of the catalogue's default blue/navy, and "SAVE
   $X" gets a solid-green pill instead of the outlined chip used for %-off. */
.mgk-pdp__price--sale { color: #C5342A; }
.mgk-chip--save { background: var(--mgk-green); color: #fff; border: 1px solid var(--mgk-green); font-weight: 800; }
.mgk-pdp__price-save { font-size: 13px; }
.mgk-pdp__flash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mgk-pdp__flash-label { font-size: 14px; font-weight: 700; color: var(--mgk-text); }
.mgk-pdp__flash-clock { display: flex; gap: 6px; }
.mgk-pdp__flash-seg { background: var(--mgk-navy-900); color: #fff; font-weight: 800; font-size: 13px; padding: 4px 9px; border-radius: 6px; min-width: 28px; text-align: center; }
.mgk-pdp__flash-note { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
/* "Limit X per customer" (Sale Campaigns admin) — a soft peach pill next to
   the qty stepper, and a red notice once the shopper's own remaining
   allowance hits zero (mgk_sale_gate_customer_limit_split() still lets them
   add more — at the regular price — so this is informational, not a hard
   block on the qty stepper). */
.mgk-chip--limit { background: #FFE4DC; color: #F0532D; font-weight: 800; letter-spacing: .03em; }
.mgk-pdp__limit-pill { font-size: 11px; padding: 3px 10px; }
.mgk-pdp__limit-notice { display: flex; align-items: center; gap: 6px; color: #E8503F; font-size: 13px; font-weight: 600; margin: 0; }
.mgk-pdp__limit-notice[hidden] { display: none !important; }
/* "Starts in X hours" (Sale Campaigns admin) — a published campaign not live
   yet but starting within 24h (mgk_sale_upcoming_hours_until()); a small
   amber notice, distinct from the red per-customer-limit notice above. */
.mgk-pdp__upcoming-notice { display: flex; align-items: center; gap: 6px; color: #92660A; background: #FFF6DA; border: 1px solid #F5DE96; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin: 0; width: fit-content; }

.mgk-pdp__offers { background: #fdf1e9; border: 1px solid #f3d9c2; border-radius: 12px; padding: 14px 16px; }
.mgk-pdp__offers-title { font-weight: 700; font-size: 12px; letter-spacing: .04em; color: #c5601f; margin: 0 0 8px; text-transform: uppercase; }
.mgk-pdp__offer-line { font-size: 14px; color: var(--mgk-text); margin: 6px 0; }

.mgk-pdp__avail { border: 1px solid var(--mgk-border); border-radius: 12px; overflow: hidden; }
.mgk-pdp__avail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.mgk-pdp__avail-row + .mgk-pdp__avail-row { border-top: 1px solid var(--mgk-border); }
.mgk-pdp__avail-icon { font-size: 20px; width: 24px; text-align: center; }
.mgk-pdp__avail-copy { flex: 1; }
.mgk-pdp__avail-title { font-weight: 700; font-size: 14px; color: var(--mgk-text); margin: 0; }
.mgk-pdp__avail-sub { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-pdp__avail-status { font-size: 13px; font-weight: 600; color: var(--mgk-green); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mgk-pdp__avail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mgk-green); display: inline-block; }
/* Out-of-stock: Delivery/Click & Collect rows stay visible but read "Unavailable"
   in red instead of the default green Available/In stock (see pdp.php). */
.mgk-pdp__avail-status--oos { color: var(--mgk-red); }
.mgk-pdp__avail-status--oos .mgk-pdp__avail-dot { background: var(--mgk-red); }
.mgk-btn--flash { background: #1454B8; color: #fff; }
.mgk-pdp__stock-chip { align-self: flex-start; }
.mgk-pdp__qty { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.mgk-pdp__qty-label { font-size: 14px; font-weight: 600; color: var(--mgk-text); }
.mgk-pdp__buyrow { display: flex; align-items: center; gap: 16px; }
.mgk-pdp__buyrow .mgk-pdp__cta { flex: 1; }
@media (max-width: 720px) {
	.mgk-pdp__grid { grid-template-columns: 1fr; gap: 16px; }
	.mgk-pdp__main { height: 240px; }
	.mgk-pdp__buyrow { flex-wrap: wrap; }
}

/* Category-scoped modifier groups (e.g. "Weight: 1kg +S$5.00, 10kg +S$45.00"),
   independent of the catch-weight tier grid above — same tile-card look as
   .mgk-weight__opt (Select Weight), single-select per group via a native
   radio input rather than a JS-driven .is-sel toggle. */
.mgk-pdp__modifiers { display: flex; flex-direction: column; gap: 16px; }
.mgk-pdp__modifier-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--mgk-text); margin: 0 0 10px; }
.mgk-pdp__modifier-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mgk-pdp__modifier-opt { position: relative; display: block; cursor: pointer; }
.mgk-pdp__modifier-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.mgk-pdp__modifier-card { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 2px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); }
.mgk-pdp__modifier-opt input:checked + .mgk-pdp__modifier-card { border-color: var(--mgk-navy); background: #EFF4FE; }
.mgk-pdp__modifier-top { display: flex; align-items: center; justify-content: space-between; }
.mgk-pdp__modifier-label { font-weight: 700; font-size: 14px; color: var(--mgk-text); }
.mgk-pdp__modifier-tag { display: none; background: var(--mgk-navy); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.mgk-pdp__modifier-opt input:checked + .mgk-pdp__modifier-card .mgk-pdp__modifier-tag { display: inline-flex; }
.mgk-pdp__modifier-price { color: #1454B8; font-weight: 900; }
.mgk-pdp__modifier-pct { align-self: flex-start; margin-top: 4px; font-size: 10px; padding: 2px 8px; }
.mgk-pdp__modifier-error { color: var(--mgk-red); font-size: 12px; font-weight: 600; margin: -6px 0 10px; }
.mgk-pdp__modifier-group.is-invalid .mgk-pdp__modifier-card { border-color: var(--mgk-red); }
@media (max-width: 720px) { .mgk-pdp__modifier-opts { grid-template-columns: repeat(2, 1fr); } }

.mgk-pdp__cta { display: flex; gap: 12px; }
.mgk-pdp__add, .mgk-pdp__buynow, .mgk-pdp__wishlist-btn { flex: 1; }
.mgk-pdp__buynow { display: none; }
.mgk-pdp__add { background: #1363FF; }
.mgk-pdp__add:hover { background: #0D3985; }
.mgk-pdp__wishlist-btn.is-active { background: var(--mgk-wish-remove); }
.mgk-pdp__wishlist-btn.is-active:hover { background: var(--mgk-red); }

/* Weight tier grid — reuses .mgk-weight__opt* (Weight Selector, S-006) but
   laid out 4-across inline on the PDP instead of S-006's 2-column page. */
.mgk-pdp__weightgrid-label { font-size: 14px; font-weight: 600; color: var(--mgk-text); margin: 0 0 8px; }
.mgk-pdp__weightgrid .mgk-weight__opts { grid-template-columns: repeat(4, 1fr); }
.mgk-pdp__weightgrid .mgk-weight__opt-price { color: #1454B8; }
.mgk-pdp__weightgrid .mgk-weight__opt.is-sel { background: #EFF4FE; }
@media (max-width: 720px) { .mgk-pdp__weightgrid .mgk-weight__opts { grid-template-columns: repeat(2, 1fr); } }

/* Mix & Match promo bar + Product Information accordion (ui-retail
   S005_ProductInfo) — full-width, replaces the old Transparent Sourcing
   card. Colours/spacing/typography match the ui-retail spec exactly. */
.mgk-pdp__mixmatch { box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; margin-top: 28px; padding: 16px 20px; background: #FFF6F1; border: 1.5px dashed #FAD1BD; border-radius: 14px; }
.mgk-pdp__mixmatch-head { display: flex; align-items: center; gap: 10px; }
.mgk-pdp__mixmatch-title { font-weight: 700; font-size: 17px; color: var(--mgk-navy-900); }
.mgk-pdp__mixmatch-till { font-weight: 600; font-size: 12.5px; color: var(--mgk-red); }
.mgk-pdp__mixmatch-items { display: flex; flex-wrap: wrap; gap: 10px; }
.mgk-pdp__mixmatch-item { box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: 10px; }
.mgk-pdp__mixmatch-item-name { font-weight: 600; font-size: 12px; color: var(--mgk-navy); }
.mgk-pdp__mixmatch-item-price { font-weight: 700; font-size: 12px; color: #1454B8; }
.mgk-pdp__mixmatch-add { flex: none; padding: 3px 9px; background: #1454B8; color: #fff; font-weight: 700; font-size: 11px; line-height: 14px; border: 0; border-radius: 999px; cursor: pointer; }
.mgk-pdp__mixmatch-add:hover { background: #0E3B81; }

.mgk-pdp__prodinfo { margin-top: 28px; }
.mgk-pdp__prodinfo-title { font-size: 20px; font-weight: 700; color: var(--mgk-navy-900); margin: 0 0 16px; }
.mgk-pdp__acc { display: flex; flex-direction: column; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: 14px; overflow: hidden; }
.mgk-pdp__acc-item { border-top: 1px solid #ECF0F5; }
.mgk-pdp__acc-item:first-child { border-top: 0; }
.mgk-pdp__acc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; font-weight: 700; font-size: 15px; color: var(--mgk-navy-900); cursor: pointer; list-style: none; }
.mgk-pdp__acc-head::-webkit-details-marker { display: none; }
.mgk-pdp__acc-head::after { content: '+'; font-weight: 700; font-size: 17px; color: var(--mgk-navy); }
.mgk-pdp__acc-item[open] > .mgk-pdp__acc-head::after { content: '\2212'; }
.mgk-pdp__acc-body { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.mgk-pdp__acc-desc { font-size: 13.5px; color: var(--mgk-navy); margin: 0; line-height: 1.4; }
/* Cooking/Delivery now render real HTML from the product's WooCommerce
   Description (wp_kses_post()), which may carry its own <p>/<ul> — reset their
   default browser margins so multi-paragraph content still reads as one
   block, matching the single plain-text line this used to always be. */
.mgk-pdp__acc-desc p, .mgk-pdp__acc-desc ul, .mgk-pdp__acc-desc ol { margin: 0 0 8px; }
.mgk-pdp__acc-desc p:last-child, .mgk-pdp__acc-desc ul:last-child, .mgk-pdp__acc-desc ol:last-child { margin-bottom: 0; }
.mgk-pdp__acc-desc ul, .mgk-pdp__acc-desc ol { padding-left: 18px; }
.mgk-pdp__acc-table { border: 1px solid #ECF0F5; border-radius: 10px; overflow: hidden; }
.mgk-pdp__acc-row { display: flex; gap: 14px; padding: 10px 14px; background: var(--mgk-surface); }
.mgk-pdp__acc-row.is-alt { background: #F8FAFC; }
.mgk-pdp__acc-row-label { flex: 0 0 220px; font-weight: 600; font-size: 12.5px; color: var(--mgk-text-3); }
.mgk-pdp__acc-row-val { font-weight: 600; font-size: 12.5px; color: var(--mgk-navy); }
@media (max-width: 720px) { .mgk-pdp__acc-row { flex-direction: column; gap: 2px; } .mgk-pdp__acc-row-label { flex-basis: auto; } }

/* ── Product tabs: Description · Delivery & returns · Reviews ─────────────
   Replaces the Product Information accordion above. The underline-tab look is
   the same one the Cart already uses (.mgk-cart__tab) rather than a second
   tab idiom: transparent 2px bottom border, navy when active. The reference
   design used a green accent on cream; navy on this theme's surface is the
   equivalent in the token palette. */
.mgk-pdp__tabs { margin-top: 28px; }
.mgk-pdp__tabstrip { display: flex; align-items: flex-end; gap: 0; border-bottom: 1px solid var(--mgk-border); overflow-x: auto; scrollbar-width: none; }
.mgk-pdp__tabstrip::-webkit-scrollbar { display: none; }
.mgk-pdp__tab { flex: 0 0 auto; background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 20px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 20px; color: var(--mgk-text-2); white-space: nowrap; cursor: pointer; }
.mgk-pdp__tab:first-child { padding-left: 0; }
.mgk-pdp__tab:hover { color: var(--mgk-navy); }
.mgk-pdp__tab.is-active { color: var(--mgk-navy); border-bottom-color: var(--mgk-navy); font-weight: 700; }
.mgk-pdp__tab:focus-visible { outline: 2px solid var(--mgk-cta-blue); outline-offset: -2px; border-radius: 4px 4px 0 0; }
.mgk-pdp__tabpanel { padding-top: 20px; }
.mgk-pdp__tabpanel[hidden] { display: none; }

/* Merchant-authored rich text (TinyMCE: bold / italic / underline / H1–H3 /
   lists / links). Headings are stepped down from the page's own h2 so a
   merchant who starts at "Heading 1" doesn't outshout the product title. */
.mgk-pdp__richtext { max-width: 78ch; font-size: 14.5px; line-height: 1.7; color: var(--mgk-navy); }
.mgk-pdp__richtext > :first-child { margin-top: 0; }
.mgk-pdp__richtext > :last-child { margin-bottom: 0; }
.mgk-pdp__richtext p { margin: 0 0 14px; }
.mgk-pdp__richtext h1, .mgk-pdp__richtext h2, .mgk-pdp__richtext h3 { color: var(--mgk-navy-900); font-weight: 700; line-height: 1.35; margin: 22px 0 10px; }
.mgk-pdp__richtext h1 { font-size: 19px; }
.mgk-pdp__richtext h2 { font-size: 17px; }
.mgk-pdp__richtext h3 { font-size: 15px; }
.mgk-pdp__richtext ul, .mgk-pdp__richtext ol { margin: 0 0 14px; padding-left: 20px; }
.mgk-pdp__richtext li { margin: 0 0 6px; }
.mgk-pdp__richtext strong, .mgk-pdp__richtext b { font-weight: 700; color: var(--mgk-navy-900); }
.mgk-pdp__richtext a { color: var(--mgk-cta-blue); text-decoration: underline; }
.mgk-pdp__richtext blockquote { margin: 0 0 14px; padding: 2px 0 2px 14px; border-left: 3px solid var(--mgk-border); color: var(--mgk-text-2); }
.mgk-pdp__richtext img { max-width: 100%; height: auto; border-radius: var(--mgk-radius-sm); }
.mgk-pdp__richtext table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.mgk-pdp__richtext th, .mgk-pdp__richtext td { border: 1px solid var(--mgk-border-lt); padding: 8px 12px; text-align: left; font-size: 13.5px; }

/* Reviews keeps its own card styling but no longer needs the standalone
   top margin it had as a separate section — the panel supplies the gap. */
.mgk-pdp__tabpanel > .mgk-pdp__reviews { margin-top: 0; }

@media (max-width: 720px) {
	.mgk-pdp__tab { padding: 10px 14px; font-size: 14px; }
	.mgk-pdp__richtext { font-size: 14px; }
}

/* Customer Reviews (S-005) */
.mgk-pdp__reviews { margin-top: 32px; }
.mgk-pdp__reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.mgk-pdp__reviews-title { font-size: 20px; font-weight: 800; color: var(--mgk-text); margin: 0 0 4px; }
.mgk-pdp__reviews-sub { font-size: 13px; color: var(--mgk-text-3); margin: 0; }
/* Star in the "4.6 ★ · 5 reviews" line — same amber as the review-card stars,
   so it doesn't read as a greyed-out rating. */
.mgk-pdp__reviews-sub-star { color: #F09830; }
/* "See all Reviews" — solid brand-blue button per the S-005 design. */
.mgk-pdp__reviews-all,
.mgk-pdp__reviews-all:link,
.mgk-pdp__reviews-all:visited { background: #1336FF; border: 1px solid #1336FF; color: #fff; }
.mgk-pdp__reviews-all:hover,
.mgk-pdp__reviews-all:focus { background: #0F2BD1; border-color: #0F2BD1; color: #fff; }
/* Review list (S-005 review-card design) — full-width stacked rows separated by
   a hairline rule, NOT a two-up card grid: name+avatar above stars+Verified,
   then an optional bold headline, then the quote. */
.mgk-pdp__reviews-list { display: flex; flex-direction: column; }
.mgk-pdp__review { display: flex; flex-direction: row; align-items: center; padding: 32px 20px; border-bottom: 1px solid #A0B8C2; }
.mgk-pdp__review:last-child { border-bottom: 0; }
.mgk-pdp__review-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.mgk-pdp__review-head { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
.mgk-pdp__review-who { display: flex; align-items: center; gap: 8px; }
/* Outranks Elementor's `.elementor img` reset (equal specificity but loaded
   after us), which would otherwise force border-radius:0 / height:auto and
   square off the round avatar. */
body .mgk-pdp__review-who img.mgk-pdp__review-avatar,
.mgk-pdp__review-avatar { width: 32px; height: 32px; border-radius: 100px; object-fit: cover; flex: 0 0 auto; }
.mgk-pdp__review-avatar--initial { background: var(--mgk-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.mgk-pdp__review-author { font-family: 'Quicksand', var(--mgk-font); font-weight: 600; font-size: 18px; line-height: 28px; color: #3D5060; }
.mgk-pdp__review-meta { display: flex; align-items: center; gap: 12px; }
.mgk-pdp__review-rating { font-family: 'Quicksand', var(--mgk-font); font-weight: 700; font-size: 20px; line-height: 28px; color: #F09830; letter-spacing: 0; }
.mgk-pdp__review-date { font-size: 12px; line-height: 16px; color: var(--mgk-text-3); }
.mgk-pdp__review-title { font-family: 'Quicksand', var(--mgk-font); font-weight: 600; font-size: 16px; line-height: 24px; color: #4A6580; margin: 0; padding: 8px 0 4px; }
.mgk-pdp__review-text { font-family: 'Quicksand', var(--mgk-font); font-weight: 500; font-size: 16px; line-height: 24px; color: #4A6580; margin: 0; padding: 8px 0; }
.mgk-pdp__review-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
body .mgk-pdp__review-photo { width: 64px; height: 64px; border-radius: var(--mgk-radius-sm); object-fit: cover; object-position: center; border: 1px solid var(--mgk-border); }
@media (max-width: 720px) { .mgk-pdp__review { padding: 20px 0; } }

/* ── Merchant reply under a review ────────────────────────────────────────
   Written in the Merchant portal (Reviews → Reply) and, until now, never
   rendered anywhere the shopper could see it. Shared treatment for both
   surfaces that show reviews: PDP card (.mgk-pdp__review-reply) and the
   S-026 Reviews page (.mgk-rev__reply).

   Read as an answer, not a second opinion: indented under the review it
   belongs to, tinted, with a rule down the left edge. The "Store" chip is
   navy on the alt surface deliberately — the blue Verified chip already
   sits a few lines up, and two blue chips would read as the same kind of
   thing. */
.mgk-pdp__review-reply,
.mgk-rev__reply {
	margin: 12px 0 0 16px;
	padding: 12px 14px;
	background: var(--mgk-bg);
	border-left: 3px solid var(--mgk-navy);
	border-radius: 0 var(--mgk-radius-sm) var(--mgk-radius-sm) 0;
}
.mgk-pdp__review-reply-head,
.mgk-rev__reply-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.mgk-pdp__review-reply-who,
.mgk-rev__reply-who { font-size: 13.5px; font-weight: 700; line-height: 18px; color: var(--mgk-navy-900); }
.mgk-pdp__review-reply-badge,
.mgk-rev__reply-badge {
	display: inline-flex; align-items: center;
	padding: 2px 8px; border-radius: 999px;
	background: var(--mgk-bg-alt); color: var(--mgk-navy);
	font-size: 11px; font-weight: 700; line-height: 16px;
	text-transform: uppercase; letter-spacing: .02em;
}
.mgk-pdp__review-reply-date,
.mgk-rev__reply-date { margin-left: auto; font-size: 12px; line-height: 16px; color: var(--mgk-text-3); }
.mgk-pdp__review-reply-text,
.mgk-rev__reply-text { margin: 0; font-size: 14px; font-weight: 500; line-height: 22px; color: var(--mgk-text-2); }

@media (max-width: 640px) {
	.mgk-pdp__review-reply,
	.mgk-rev__reply { margin-left: 10px; padding: 10px 12px; }
	/* The date drops under the name rather than being squeezed onto the row. */
	.mgk-pdp__review-reply-date,
	.mgk-rev__reply-date { margin-left: 0; flex-basis: 100%; }
	.mgk-pdp__review-reply-text,
	.mgk-rev__reply-text { font-size: 13.5px; line-height: 20px; }
}

/* ── 019 Weight Selector ───────────────────────────────────── */
.mgk-weight__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 960px; margin: 0 auto; }
.mgk-weight__media { }
body .mgk-weight__img { width: 100%; height: 320px; object-fit: cover; object-position: center; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); }
.mgk-weight__img--ph { display: flex; align-items: center; justify-content: center; font-size: 72px; background: var(--mgk-bg-alt); }
.mgk-weight__panel { display: flex; flex-direction: column; gap: 16px; }
.mgk-weight__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-weight__product { font-size: 13px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-weight__sub { font-size: 13px; color: var(--mgk-text-2); margin: 0 0 12px; }
.mgk-weight__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mgk-weight__opt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px; border: 2px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); cursor: pointer; font-family: inherit; }
.mgk-weight__opt.is-sel { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }
.mgk-weight__opt-top { display: flex; align-items: center; justify-content: space-between; }
.mgk-weight__opt-w { font-weight: 700; font-size: 14px; color: var(--mgk-text); }
.mgk-weight__opt-tag { background: var(--mgk-navy); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.mgk-weight__opt-price { color: var(--mgk-teal); font-weight: 900; }
.mgk-weight__opt-est { font-size: 12px; color: var(--mgk-text-3); }
.mgk-weight__bd-title { font-size: 15px; font-weight: 700; color: var(--mgk-text); margin: 0 0 12px; }
.mgk-weight__bd { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--mgk-text-2); margin-bottom: 12px; }
.mgk-weight__bd-row { display: flex; justify-content: space-between; }
.mgk-weight__bd-teal { color: var(--mgk-teal); font-weight: 600; }
.mgk-weight__bd-amber { color: var(--mgk-amber); font-weight: 600; }
.mgk-weight__policy { background: var(--mgk-amber-bg); border: 1px solid rgba(240,152,48,.27); border-radius: var(--mgk-radius-sm); padding: 12px; font-size: 12px; color: var(--mgk-text-2); }
.mgk-weight__policy strong { color: var(--mgk-amber); }

/* ── 020 Cart ──────────────────────────────────────────────── */
/* ui-retail S-007 spec (cart.svg): every text node in this screen is set in
   Quicksand, unlike the rest of the site which keeps --mgk-font (Inter,
   see mgk-font-quicksand enqueue comment in functions.php). Scoped to
   .mgk-cart so surrounding chrome (header/nav) is unaffected. */
.mgk-cart { font-family: 'Quicksand', var(--mgk-font); }
/* ui-retail S-007 spec (cart.svg breadcrumb) + user request: back link sits
   above the Cart/Wishlist tab switch, both outside either tab panel so the
   tabs stay reachable no matter which panel is hidden. The old standalone
   "Shopping Cart" title was dropped — the tab label + count below it is the
   only heading now. */
.mgk-cart__back { display: inline-block; color: #1363FF; font-size: 13px; font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.mgk-cart__back:hover { text-decoration: underline; }
.mgk-cart__tabs { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--mgk-border); margin-bottom: 20px; }
.mgk-cart__tab-buttons { display: flex; align-items: flex-end; gap: 0; }
.mgk-cart__tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--mgk-text-2); font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 20px; cursor: pointer; }
.mgk-cart__tab.is-active { color: var(--mgk-navy); border-bottom-color: var(--mgk-navy); }
.mgk-cart__tab[data-mgk-cart-tab="wishlist"] { display: none; }
.mgk-cart__tabs-count { color: var(--mgk-text-2); font-size: 14px; font-weight: 500; padding: 10px 0; white-space: nowrap; }
/* Same element, used outside the tabs row: sitting as a direct child of the
   flex-column .mgk-cart__main (right above .mgk-delivery), it would otherwise
   stretch full-width and left-align its text like any block content. This is
   the only override needed to place it there — the base rule above (colour,
   size, weight) still applies unchanged, including at the 720px breakpoint. */
.mgk-cart__main > .mgk-cart__tabs-count { display: block; text-align: right; padding: 0; }
.mgk-cart__grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.mgk-cart__grid[hidden] { display: none !important; }
.mgk-cart__main { display: flex; flex-direction: column; gap: 16px; }
/* ui-retail S-007 spec (aa.svg "Frame 2147226123" — empty cart): replaces the
   whole items+summary grid, not just the items list, when the cart has zero
   lines. Centered icon + copy + CTA, no sidebar/FBT (the design doesn't draw
   them for this state). */
.mgk-cart__empty { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 349px; margin: 96px auto; text-align: center; }
.mgk-cart__empty[hidden] { display: none !important; }
.mgk-cart__empty-icon { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.mgk-cart__empty-icon svg { width: 100px; height: 100px; }
.mgk-cart__empty-copy { display: flex; flex-direction: column; gap: 8px; }
.mgk-cart__empty-title { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-cart__empty-text { font-size: 15px; font-weight: 400; color: var(--mgk-text); margin: 0; line-height: 1.3; }
.mgk-cart__empty-cta { background: #1363FF; color: #fff; font-size: 15.5px; font-weight: 700; padding: 15px 40px; border-radius: 12px; }
.mgk-cart__empty-cta:hover { background: #0E4FD1; }
/* No footer while the cart is empty — same technique as the "No footer on
   mobile" rule further down (home/footer.php: the PDPA & Cookie Preferences
   modal lives inside <footer> as a sibling of .mgk-footer__row, so it's only
   the row that's hidden and the box that's flattened; display:none on
   .mgk-footer itself would take the modal with it and break every
   "Manage Preferences" trigger on other pages that share this stylesheet). */
body:has(.mgk-cart__empty:not([hidden])) .mgk-footer__row { display: none; }
body:has(.mgk-cart__empty:not([hidden])) .mgk-footer { padding: 0; margin: 0; border-top: 0; background: none; }
.mgk-fbt { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--mgk-border); }
.mgk-sh--tight { margin-bottom: 12px; }
/* Same horizontal-scroller pattern as .mgk-freshpicks__row (Search Results
   "Today's Fresh Picks") — 5 cards visible, prev/next arrows in the heading
   row scroll the rest into view instead of wrapping to a 2nd line. */
.mgk-fbt__grid { display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
.mgk-fbt__grid::-webkit-scrollbar { display: none; }
/* Cards are sized to fill the row EXACTLY ((100% - gaps)/5), so at the end of the
   scroll the last card's right edge lands precisely on the scrollport's clip
   edge — shaving off its 1px border and 14px corner radius, which reads as the
   card being sliced flat. The card is not actually cut short; there is simply no
   room left to PAINT its edge.
   A 1px right padding gives that edge somewhere to live. It is inside the
   scrollport, so it extends scrollWidth by 1px and the card scrolls fully into
   view instead of stopping flush against the clip. Padding, not margin: a
   margin would sit outside the scrollable area and change nothing. */
.mgk-fbt__grid { padding-right: 1px; }
.mgk-fbt__grid .mgk-prod { flex: 0 0 calc((100% - 24px * 4) / 5); min-width: 200px; }
@media (max-width: 1024px) {
	.mgk-fbt__grid .mgk-prod { flex-basis: calc((100% - 24px * 2) / 3); }
}
@media (max-width: 720px) {
	.mgk-fbt__grid .mgk-prod { flex-basis: calc((100% - 16px) / 2); min-width: 160px; }
	.mgk-fbt__grid { gap: 16px; }
}
.mgk-cart__head { display: flex; align-items: baseline; justify-content: space-between; }
.mgk-cart__count { font-size: 20px; font-weight: 700; color: var(--mgk-text); }
/* Clear-all UI disabled — commented out, not deleted (kept restorable by uncommenting).
.mgk-cart__clear { background: none; border: none; color: var(--mgk-red); font-size: 14px; cursor: pointer; }
*/
/* NO overflow:hidden here. The card's rounded corners are clipped by rounding
   the first/last row instead, because overflow:hidden on this container also
   clips the absolutely-positioned .mgk-cartrow__optpanel dropdown — an open
   "change options" popover on the last row got cut off at the card's bottom
   edge and read as hiding behind the "Offer for you" section below. */
.mgk-cart__items { display: flex; flex-direction: column; background: var(--mgk-surface); border-radius: var(--mgk-radius); }
.mgk-cart__items > .mgk-cartrow:first-child { border-top-left-radius: var(--mgk-radius); border-top-right-radius: var(--mgk-radius); }
.mgk-cart__items > .mgk-cartrow:last-child { border-bottom-left-radius: var(--mgk-radius); border-bottom-right-radius: var(--mgk-radius); }
/* ui-retail S-007 spec (cart.svg "Row" component): one horizontal row —
   thumbnail, name+subtitle, stepper+price+remove — divided by hairlines
   inside a single white card, not individually-boxed .mgk-card rows. */
.mgk-cartrow { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--mgk-border-lt); }
.mgk-cart__items .mgk-cartrow:last-child { border-bottom: none; }
.mgk-cartrow__media { width: 60px; height: 60px; border-radius: var(--mgk-radius-sm); overflow: hidden; background: var(--mgk-bg-alt); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
body .mgk-cartrow__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-cartrow__ph { font-size: 28px; }
/* Fixed-width controls column (not flex auto-space) so the stepper/price/
   remove group lines up at the same x across every row regardless of how
   long the product name + subtitle text runs. */
.mgk-cartrow__body { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.mgk-cartrow__top { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mgk-cartrow__name { font-size: 16px; font-weight: 400; color: var(--mgk-text); margin: 0; text-decoration: none; }
.mgk-cartrow__name:hover { text-decoration: underline; }
.mgk-cartrow__sub { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
.mgk-cartrow__discount { color: #498228; font-weight: 600; }
/* Change-options popover — reuses .mgk-pill's open/close JS (data-mgk-pill,
   data-mgk-pill-toggle, data-mgk-pill-panel) and .mgk-pill__actions footer,
   but the trigger sits inline under the price line (not in a filter bar) and
   the panel body is single-select pill-button groups instead of checkboxes. */
.mgk-cartrow__optpill { margin-top: 6px; }
/* A row whose popover is open must paint above the rows AFTER it — those are
   later siblings, so their opaque backgrounds would otherwise cover the
   panel regardless of its own z-index. Only the open row is promoted (not
   every row) so the default paint order stays untouched while closed. */
.mgk-cartrow:has(.mgk-pill.is-open) { position: relative; z-index: 30; }
/* Trigger = the "Dropdown Menu" spec: 203×22 bordered box showing this line's
   current picks, Quicksand 12/16, with a 14px caret. Deliberately NOT
   .mgk-pill__btn (grey pill, bold 13px) — only the panel below reuses the
   pill component. max-width keeps it inside the row on narrow screens, where
   the fixed 203px would otherwise overflow .mgk-cartrow__top. */
.mgk-cartrow__optbtn { box-sizing: border-box; display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 2px 8px; width: 203px; max-width: 100%; height: 22px; border: 1px solid #E5E6EB; border-radius: 4px; background: var(--mgk-surface); cursor: pointer; }
.mgk-cartrow__optbtn-text { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; font-family: 'Quicksand', inherit; font-style: normal; font-weight: 400; font-size: 12px; line-height: 16px; color: #1E3545; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgk-cartrow__optbtn-caret { flex: none; width: 14px; height: 14px; transition: transform .15s ease; }
.mgk-cartrow__optbtn[aria-expanded="true"] .mgk-cartrow__optbtn-caret { transform: rotate(-180deg); }
/* ui-retail S-007 spec ("Dropdown variant" frame): a plain white card —
   12px padding, 8px radius, #E5E6EB hairline, NO drop shadow — split into
   the option groups (28px below) and a right-aligned action row.
   Width tracks the 203px trigger above rather than the spec frame's 245px,
   so the open panel lines up flush with the closed control instead of
   overhanging it by 42px; max-width follows the trigger's own 100% cap so
   both shrink together inside a narrow .mgk-cartrow__top.
   The spec's 220px height is its sample content at natural size, NOT a fixed
   box — height stays auto so a line with more (or fewer) groups than the
   sample grows or shrinks instead of clipping or padding dead space. */
.mgk-cartrow__optpanel {
	box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-end;
	width: 203px; min-width: 0; max-width: 100%; max-height: none; padding: 12px; gap: 28px;
	background: #FFFFFF; border: 1px solid #E5E6EB; border-radius: 8px; box-shadow: none;
	font-family: 'Quicksand', var(--mgk-font);
}
/* "Frame 2147226393" — the stack of group rows. Stretched to the panel's
   inner width, and its rows start at the left: the panel's align-items:
   flex-end exists only to make the action row hug right, so it must not
   cascade down here or wrapped chips would right-align mid-list. */
.mgk-cartrow__optgroups { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; align-self: stretch; }
/* One group row: "Vegetable:" label then its chips, 4px apart. align-items
   center (not baseline) so the 16px label text centres against the 20px
   chips, per the spec's row height of exactly 20px. */
.mgk-cartrow__optgroup { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; align-self: stretch; }
.mgk-cartrow__optlabel { flex: 0 0 auto; display: flex; align-items: center; height: 16px; font-family: 'Quicksand', var(--mgk-font); font-style: normal; font-weight: 400; font-size: 12px; line-height: 16px; color: #1E3545; }
/* The chips are direct children of the row in the spec (no inner wrapper),
   so this contributes no box of its own — display:contents lets the existing
   .mgk-cartrow__optchoices element hand its buttons to the row's flex layout
   and keeps the 4px gap uniform between label and every chip. */
.mgk-cartrow__optchoices { display: contents; }
.mgk-cartrow__optchoice {
	box-sizing: border-box; display: flex; flex-direction: row; justify-content: center; align-items: center;
	height: 20px; padding: 2px 8px; gap: 10px;
	border: 1px solid #DCE5EA; border-radius: 4px; background: transparent;
	font-family: 'Quicksand', var(--mgk-font); font-style: normal; font-weight: 400; font-size: 12px; line-height: 16px;
	color: #1E3545; white-space: nowrap; cursor: pointer;
}
.mgk-cartrow__optchoice:hover { border-color: #165DFF; }
/* Selected chip: blue-tinted fill + #165DFF border, label in #1363FF. */
.mgk-cartrow__optchoice.is-sel { background: #E8F3FF; border-color: #165DFF; color: #1363FF; }
/* "Frame 2147226392" — the action row. Scoped to this panel because the
   shared .mgk-pill__actions (shop filter bar) keeps its own space-between
   layout with an underlined text "Clear" and a pill-shaped "View" button;
   here both are 24px rounded-rect buttons, right-aligned, 12px apart. */
.mgk-cartrow__optpanel .mgk-pill__actions { display: flex; flex-direction: row; justify-content: flex-end; align-items: flex-start; gap: 12px; margin-top: 0; }
.mgk-cartrow__optpanel .mgk-pill__clear,
.mgk-cartrow__optpanel .mgk-pill__view {
	box-sizing: border-box; display: flex; flex-direction: row; justify-content: center; align-items: center;
	flex: none; height: 24px; padding: 2px 12px; gap: 8px; margin-top: 0;
	border-radius: 6px; font-family: 'Quicksand', var(--mgk-font); font-style: normal; font-weight: 400;
	font-size: 12px; line-height: 20px; white-space: nowrap; cursor: pointer; text-decoration: none;
}
/* "Back" — outlined secondary. */
.mgk-cartrow__optpanel .mgk-pill__clear { align-self: auto; background: transparent; border: 1px solid #1363FF; color: #1363FF; }
/* "Confirm" — solid primary, no border (the spec gives it none, so the 1px
   the outlined sibling carries is replaced by a transparent one to keep both
   buttons the same 24px tall). */
.mgk-cartrow__optpanel .mgk-pill__view { background: #1363FF; border: 1px solid transparent; color: #FFFFFF; }
.mgk-cartrow__optpanel .mgk-pill__clear:hover,
.mgk-cartrow__optpanel .mgk-pill__view:hover { opacity: .85; }
.mgk-cartrow__line { color: var(--mgk-text); font-weight: 600; font-size: 16px; margin: 0; text-align: right; }
/* Fixed-width columns (stepper 120px, price 90px, ~64px for the Remove
   label) so every row's stepper/price/remove line up at the same x
   regardless of neighboring text length. flex-basis is an explicit px
   value (not auto) so the browser reserves this width up front, rather
   than sizing this group from its children's content after .mgk-cartrow__top
   (flex: 1 1 0%) has already claimed the row's free space — Firefox and
   Chromium resolved that content-based auto-basis differently, letting
   "Remove" get squeezed narrower than its own nowrap text in Firefox and
   spill past .mgk-cart__items' overflow:hidden. */
.mgk-cartrow__controls { display: flex; align-items: center; gap: 14px; flex: 0 0 302px; }
.mgk-cartrow__controls .mgk-qty { flex: 0 0 120px; }
.mgk-cartrow__controls .mgk-cartrow__line { flex: 0 0 90px; }
.mgk-cartrow__controls .mgk-cartrow__remove { flex: 0 0 64px; }
/* ui-retail S-007 spec (cart.svg "Remove" label): underlined muted text,
   not the red icon+text treatment used before — the red is reserved for
   destructive/error states (OOS chip, clear-all) elsewhere on this page. */
.mgk-cartrow__remove { background: none; border: none; color: var(--mgk-text-3); font-size: 12.5px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.mgk-cartrow__remove:hover { color: var(--mgk-red); }
.mgk-cartrow.is-oos .mgk-cartrow__media { opacity: .5; }
.mgk-cartrow.is-oos .mgk-cartrow__name { color: var(--mgk-text-3); }
.mgk-cart__aside { display: flex; flex-direction: column; gap: 16px; }
/* ui-retail S-007 spec (cart.svg "Summary" frame): a deeper shadow than the
   shared .mgk-card default, to read as the page's primary card. */
.mgk-cart__aside > .mgk-card:first-child { box-shadow: 0 2px 12px rgba(15, 23, 41, .06); }
.mgk-cart__summary-title { font-size: 18px; font-weight: 700; color: var(--mgk-text); margin: 0 0 16px; }
.mgk-cart__freeship { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 4px 0; border-radius: var(--mgk-radius-sm); background: var(--mgk-halal-bg); color: var(--mgk-halal); font-size: 14px; }
.mgk-cart__freeship[hidden] { display: none !important; }
/* "Add promo code" row (S-007) — a collapsed toggle for signed-in shoppers
   (opens the .mgk-checkout__voucher redeem form, reused as-is) vs a disabled
   hint + login link for guests, since applying a voucher needs a real
   account (mgk_core_ajax_voucher_apply() rejects guests server-side). */
.mgk-cart__voucher-row, .mgk-cart__voucher-wrap { margin: 2px 0 10px; }
.mgk-cart__voucher-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.mgk-cart__voucher-hint, .mgk-cart__voucher-login, .mgk-cart__voucher-toggle { display: flex; align-items: center; gap: 6px; }
.mgk-cart__voucher-hint { color: var(--mgk-text-3); }
.mgk-cart__voucher-login { color: var(--mgk-teal); text-decoration: none; font-weight: 600; font-size: 13px; }
.mgk-cart__voucher-login:hover { text-decoration: underline; }
.mgk-cart__voucher-toggle { background: none; border: none; padding: 0; color: var(--mgk-teal); font-weight: 600; font-size: 13px; font-family: inherit; cursor: pointer; }
.mgk-cart__voucher-form[hidden] { display: none !important; }
.mgk-cart__voucher-form { margin: 8px 0 0; }
.mgk-cart__checkout, .mgk-checkout__pay, .mgk-weight__cta, .mgk-weight__back { width: 100%; }
/* checkou.svg (merged Checkout+Payment) spec: same primary blue (#1363FF) as
   the cart page's CTA — the merged design uses one accent blue throughout. */
.mgk-checkout__pay { background: #1363FF; }
.mgk-checkout__pay:hover { background: #0E4FD1; }
/* ui-retail S-007 spec (cart.svg): the cart's checkout CTA uses the design's
   primary blue (#1363FF), not the site-wide teal — same override pattern as
   .mgk-checkout__pay above, different exact blue per that screen's spec. */
.mgk-cart__checkout { background: #1363FF; font-size: 16px; padding: 15px 0; }
.mgk-cart__checkout:hover { background: #0E4FD1; }
.mgk-cart__aside-secure { display: block; text-align: center; font-size: 12px; color: var(--mgk-text-3); margin: 10px 0 0; }
.mgk-checkout__back { display: flex; width: fit-content; margin: 10px auto 0; }
/* The hidden attribute must beat .mgk-btn { display:inline-flex } — used when
   $mgk_has_order (checkout.php) hides the delivery-details sections behind
   the Payment Method card. */
.mgk-checkout__pay[hidden] { display: none !important; }
.mgk-pay__methodhint[hidden] { display: none !important; }
.mgk-pay__methodhint { font-size: 13px; color: var(--mgk-text-2); margin: 8px 0 0; line-height: 1.4; }

/* ── 021 Checkout / 022 Payment ────────────────────────────── */
.mgk-checkout__grid, .mgk-pay__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
.mgk-checkout__main, .mgk-pay__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mgk-checkout__methods, .mgk-pay__methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mgk-checkout__zone { color: var(--mgk-green); font-size: 12px; margin: 4px 0 12px; font-weight: 600; }
.mgk-checkout__zone--hint { color: #6b7280; font-weight: 500; }
/* Billing-address toggle + revealed 2nd form (default hidden). */
.mgk-checkout__billing-toggle { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--mgk-text-2); cursor: pointer; user-select: none; }
.mgk-checkout__billing-toggle input { width: 17px; height: 17px; accent-color: var(--mgk-teal); cursor: pointer; flex: 0 0 auto; }
.mgk-checkout__billing { margin-top: 14px; padding-top: 16px; border-top: 1px dashed var(--mgk-border); }
.mgk-checkout__billing[hidden] { display: none; }
/* "This is a business purchase" (checkout.svg) — plain square checkbox,
   gates Company + GST/Tax ID (dimmed until ticked, not hidden). */
.mgk-checkout__business-toggle { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 12px; font-weight: 500; color: var(--mgk-text-2); cursor: pointer; user-select: none; }
.mgk-checkout__business-toggle input { width: 17px; height: 17px; accent-color: var(--mgk-teal); cursor: pointer; flex: 0 0 auto; }
.mgk-checkout__business-fields { margin-top: 12px;  }
.mgk-field__opt { color: var(--mgk-text-3); font-weight: 400; }
.mgk-checkout__zone--ok { color: #0f5132; }
.mgk-checkout__zone--err { color: var(--mgk-red); font-weight: 400; }
/* checkou.svg spec: 3 flat pills, each already combining its own date + time
   ("Tomorrow, 10:00–12:00") — replaces the old date-tabs + time-grid UI. */
.mgk-checkout__timeslots { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.mgk-checkout__timeslot { padding: 10px 16px; border-radius: var(--mgk-radius-sm); border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.mgk-checkout__timeslot.is-sel { background: #EFF4FE; border-color: #1363FF; color: #1363FF; }
.mgk-checkout .mgk-slot.is-sel { background: #EFF4FE; border: 1.5px solid #1363FF; color: #1363FF; }
.mgk-checkout__note { font-size: 12px; color: var(--mgk-text-3); margin: 12px 0 0; }
.mgk-checkout__aside .mgk-card, .mgk-pay__aside .mgk-card { position: sticky; top: 16px; }
.mgk-paynow { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; }
.mgk-paynow__title { font-size: 14px; font-weight: 600; color: var(--mgk-text); margin: 0; }
.mgk-paynow__qr { width: 180px; height: 180px; padding: 10px; border: 3px solid var(--mgk-navy); border-radius: var(--mgk-radius-sm); background: #fff; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mgk-paynow__cell { border-radius: 2px; }
.mgk-paynow__cell.is-on { background: var(--mgk-navy); }
.mgk-paynow__expiry { color: var(--mgk-red); font-size: 14px; font-weight: 700; margin: 0; }
.mgk-paynow__amount { color: var(--mgk-text); font-size: 26px; font-weight: 900; margin: 0; }
.mgk-paynow__uen { color: var(--mgk-text-3); font-size: 12px; margin: 0; }
.mgk-pay__total { text-align: center; padding: 12px 0; border-top: 1px solid var(--mgk-border); margin: 4px 0; }
.mgk-pay__total-val { display: block; color: var(--mgk-navy); font-size: 32px; font-weight: 900; }
.mgk-pay__total-cap { font-size: 12px; color: var(--mgk-text-3); }
.mgk-pay__facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; margin-bottom: 16px; }
.mgk-pay__fact { display: flex; justify-content: space-between; gap: 12px; color: var(--mgk-text-2); }
.mgk-pay__fact-val { color: var(--mgk-text); font-weight: 600; text-align: right; }
.mgk-pay__terms { font-size: 11px; color: var(--mgk-text-3); text-align: center; margin: 8px 0 0; }

/* ── Checkout+Payment merge (ui-retail checkout.svg "Pay/Checkout/Credit
   card-SignedIn") — accordion Payment Method card, per-item promo chip (see
   .mgk-sumitems__chip above), discount-code input + voucher carousel. The
   pre-existing .mgk-optcard grid (.mgk-checkout__methods/.mgk-pay__methods,
   Delivery Method + old Payment Method cards) is untouched; this is a new,
   separate component only used by the merged Payment Method card. ────────── */
.mgk-paymethods { display: flex; flex-direction: column; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); overflow: hidden; margin-bottom: 16px; }
.mgk-paymethod { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 16px; border: none; border-top: 1px solid var(--mgk-border); background: var(--mgk-surface); cursor: pointer; font-family: inherit; text-align: left; }
.mgk-paymethod:first-child { border-top: none; }
.mgk-paymethod.is-sel { background: var(--mgk-bg-alt, #EFF4FE); }
.mgk-paymethod.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.mgk-paymethod__radio { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--mgk-border-strong, #BFCCD9); background: #fff; box-sizing: border-box; }
.mgk-paymethod.is-sel .mgk-paymethod__radio { border: 5px solid #1363FF; }
.mgk-paymethod__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mgk-paymethod__label { font-size: 14px; font-weight: 700; color: var(--mgk-text); }
.mgk-paymethod__desc { display: none; }
.mgk-paymethod__meta { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--mgk-text-3); text-align: right; }
/* Expanded content panel — only the .is-sel row's panel is ever visible;
   setMethod() (mgk-storefront.js) already toggles [hidden] on each box by
   method key, this just styles the panel wrapper itself. */
.mgk-paymethod__panel { padding: 4px 16px 16px 46px; background: var(--mgk-bg-alt, #EFF4FE); }
.mgk-paymethod__panel[hidden] { display: none; }
.mgk-paymethod__panel .mgk-paynow { padding-top: 0; align-items: flex-start; text-align: left; }
.mgk-paymethod__panel .mgk-paynow__box { align-items: center; text-align: center; width: 100%; }

/* Saved card row (design: VISA badge + masked number + "Change" — mirrors
   .mgk-checkout__addrsummary's "one line + Change link" pattern; the full
   list of saved cards only shows once "Change" reveals the inline panel
   below, which reuses .mgk-checkout__addrpicker2's markup/classes directly —
   see checkout.php — so no separate ruleset is needed for the list itself).
   .mgk-cardpicker-badge is the one card-specific addition: an inline
   "Default" badge sitting next to the cardholder name on the same line
   (.mgk-chip is already inline-flex; this just removes the address variant's
   own-line spacing). */
/* Saved card = a white "selected" row (brand · masked number · ✓ Selected)
   stacked above a plain "Use a different card" link. The wrapper is just the
   vertical stack — the tinted card surface lives on __row — so the link reads
   as a separate action below the card rather than a control inside it. */
.mgk-savedcard { display: block; margin-bottom: 10px; }
.mgk-savedcard[hidden] { display: none; }
.mgk-savedcard__row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 10px; }
/* Holds real brand artwork (VISA logo / Mastercard SVG) at the mockup's 40x21.
   The navy pill + white text is only the fallback for a brand with no artwork,
   so it's scoped off the badge box itself and dropped once a logo is present. */
.mgk-savedcard__brand { flex: 0 0 auto; width: 40px; height: 21px; border-radius: 2px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--mgk-navy-900); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.mgk-savedcard__brand img, .mgk-savedcard__brand svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.mgk-savedcard__brand[data-brand="visa"] { background: #fff; }
.mgk-savedcard__brand[data-brand="amex"] { background: #016FD0; }
.mgk-savedcard__detail { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--mgk-text); }
.mgk-savedcard__status { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #12805C; }
/* Underline is part of the design (it reads as a link, not a label). Declared
   with the element-qualified selector + !important because Elementor's and
   WooCommerce's own `a { text-decoration: none }` resets outrank a plain
   single-class rule here and were flattening it. */
a.mgk-savedcard__change, .mgk-savedcard__change { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: #1363FF; text-decoration: underline !important; text-underline-offset: 2px; }
a.mgk-savedcard__change:hover { text-decoration: underline !important; opacity: .85; }
.mgk-card-form__usenew { display: inline-block; margin-bottom: 12px; font-size: 12.5px; font-weight: 600; color: var(--mgk-navy); text-decoration: underline; }
.mgk-cardpicker-badge { margin-right: 6px; }

/* Card-list color correction to match UI-html/savecard.css exactly — the
   shared .mgk-checkout__addrpicker2-* rules above use the address book's
   own token colors, which are close but not identical to the card mockup's
   spec. Scoped under [data-mgk-card-picker] so the address panel is
   untouched. */
[data-mgk-card-picker].mgk-checkout__addrpicker2 .mgk-checkout__addrpicker2-item { border-color: rgba(0, 64, 93, .22); }
[data-mgk-card-picker].mgk-checkout__addrpicker2 .mgk-checkout__addrpicker2-item.is-sel { border-color: #165DFF; }
[data-mgk-card-picker].mgk-checkout__addrpicker2 .mgk-checkout__addrpicker2-block { color: #061937; font-weight: 600; }
[data-mgk-card-picker].mgk-checkout__addrpicker2 .mgk-checkout__addrpicker2-who { color: #8A9FB5; }
[data-mgk-card-picker].mgk-checkout__addrpicker2 .mgk-checkout__addrpicker2-delete { color: #F04438; }
.mgk-cardpicker-badge.mgk-chip--blue { background: #E8F7FF; color: #3491FA; border: none; }
.mgk-cardmodal__save { background: #1363FF; color: #fff; border-color: #1363FF; }

/* Add New Card modal (data-mgk-cardmodal) — matches
   UI-html/formedit.css/.svg exactly: 560px dialog, every field stacked full-
   width on its own line (Card Number / Name on card / Expiry / CVV/CVC — no
   2-column row), Quicksand labels, #EFF2F6-bordered 48px-tall inputs,
   #1363FF checkbox. Reuses .mgk-addrmodal's overlay/head/foot chrome
   verbatim; only the body content and its Stripe Elements mounts are
   specific to this modal. Card fields are mounted here exactly like the
   inline pay-now form (mountCardElement()'s split cardNumber/cardExpiry/
   cardCvc pattern) — the div[data-mgk-cardmodal-number/-exp/-cvc] targets
   are empty containers Stripe.js fills with its own iframe. */
.mgk-cardmodal .mgk-addrmodal__dialog { max-width: 560px; }
.mgk-cardmodal .mgk-addrmodal__head { font-family: 'Quicksand', var(--mgk-font); }
.mgk-cardmodal .mgk-addrmodal__title { font-size: 20px; }
.mgk-cardmodal .mgk-addrmodal__body { gap: 16px; }
.mgk-cardmodal .mgk-addrmodal__body > .mgk-card-form__field { margin-bottom: 0; }
.mgk-cardmodal .mgk-card-form__row2 { display: flex; flex-direction: row; align-items: flex-start; gap: 16px; }
.mgk-cardmodal .mgk-card-form__row2 > .mgk-card-form__field { flex: 1 1 0; min-width: 0; }
.mgk-cardmodal .mgk-card-form__field { gap: 8px; }
.mgk-cardmodal .mgk-card-form__field label { font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 600; line-height: 18px; color: #061937; }
.mgk-cardmodal .mgk-card-form__input {
	box-sizing: border-box; width: 100%; height: 48px; padding: 0 16px; display: flex; align-items: center;
	border: 1px solid #EFF2F6; border-radius: 12px; background: #fff; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; line-height: 18px; color: #061937;
}
/* Stripe Elements mount points: must stay display:block, NOT flex. Stripe
   wraps its iframe in its own div.__PrivateStripeElement, which it stamps
   with an inline "display: block !important" — inside a flex container
   that div becomes a flex item with flex-grow:0/flex-basis:auto and
   collapses to ~1px width no matter what width/flex rules we put on the
   iframe itself (only DIRECT flex children respond to flex-grow, and
   Stripe's inline style always wins the specificity fight over the
   wrapper's own display). Fix: keep the mount point in normal block flow
   so the wrapper's own "width:100%"-equivalent sizing (Stripe sets
   min-width:100% on the iframe) actually resolves against a real
   available width, and vertically-center the ~17px-tall content via
   padding math instead of align-items. */
.mgk-cardmodal [data-mgk-cardmodal-number], .mgk-cardmodal [data-mgk-cardmodal-exp], .mgk-cardmodal [data-mgk-cardmodal-cvc],
.mgk-cardmodal [data-mgk-paymethod-modal-number], .mgk-cardmodal [data-mgk-paymethod-modal-exp], .mgk-cardmodal [data-mgk-paymethod-modal-cvc] {
	box-sizing: border-box; width: 100%; height: 48px; padding: 15px 16px;
	border: 1px solid #EFF2F6; border-radius: 12px; background: #fff;
}
.mgk-cardmodal [data-mgk-cardmodal-number] iframe, .mgk-cardmodal [data-mgk-cardmodal-exp] iframe, .mgk-cardmodal [data-mgk-cardmodal-cvc] iframe,
.mgk-cardmodal [data-mgk-paymethod-modal-number] iframe, .mgk-cardmodal [data-mgk-paymethod-modal-exp] iframe, .mgk-cardmodal [data-mgk-paymethod-modal-cvc] iframe {
	width: 100% !important;
}
/* Our own brand badge inside the Card Number field (Stripe's built-in icon is
   turned off — it's iframe-bound and can't be restyled to match the saved-card
   list). Absolutely positioned rather than flex: per the note above, the
   Stripe mount MUST stay in block flow or its iframe collapses to ~1px. The
   mount then just gets extra left padding to clear the badge. */
.mgk-cardmodal .mgk-card-form__number,
.mgk-card-form__number { position: relative; }
.mgk-cardmodal .mgk-card-form__brand,
.mgk-card-form__brand { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 1; display: flex; align-items: center; pointer-events: none; font-size: 12px; font-weight: 600; color: #8A9FB5; text-transform: uppercase; }
.mgk-cardmodal .mgk-card-form__brand[hidden],
.mgk-card-form__brand[hidden] { display: none; }
.mgk-cardmodal .mgk-card-form__brand img, .mgk-cardmodal .mgk-card-form__brand svg,
.mgk-card-form__brand img, .mgk-card-form__brand svg { display: block; width: 34px; height: auto; }
.mgk-cardmodal .mgk-card-form__number:has(.mgk-card-form__brand:not([hidden])) [data-mgk-paymethod-modal-number] { padding-left: 60px; }
/* Guest/no-saved-card inline field (checkout.php's data-mgk-card-box, NOT the
   .mgk-cardmodal popup) — same left-padding reflow once Stripe's cardNumber
   Element replaces the plain input via mountCardElement() (mgk-storefront.js).
   That swap drops the original data-mgk-card-number attribute (a fresh mount
   <div class="mgk-card-form__stripe-mount"> replaces the <input> outright),
   so this targets the mount's class instead of the now-gone attribute. */
.mgk-card-form__number:has(.mgk-card-form__brand:not([hidden])) .mgk-card-form__stripe-mount { padding-left: 60px; }
.mgk-cardmodal .mgk-addrmodal__default { display: flex; align-items: center; gap: 12px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 500; color: #061937; }
.mgk-cardmodal .mgk-addrmodal__default input[type="checkbox"] { width: 24px; height: 24px; border-radius: 6px; accent-color: #1363FF; cursor: pointer; }
.mgk-cardmodal .mgk-addrmodal__foot { padding: 24px 32px 32px; gap: 12px; }
.mgk-cardmodal .mgk-addrmodal__foot .mgk-btn { min-width: 140px; height: 36px; padding: 7px 20px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 500; border-radius: 8px; }
.mgk-req { color: var(--mgk-red); }

/* Stock-hold countdown, above the Order Summary card (checkout only). */
.mgk-checkout__holdtimer { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #E3F0FF; border: 1px solid rgba(21,101,192,.27); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 13.5px; color: var(--mgk-navy); }
.mgk-checkout__holdtimer-clock { font-weight: 800; color: var(--mgk-blue); font-family: var(--mgk-mono, monospace); }

/* Order Summary head (item count) + discount-code input + voucher carousel. */
.mgk-checkout__sumhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mgk-checkout__sumhead .mgk-cart__summary-title { margin: 0; }
.mgk-checkout__sumcount { font-size: 12.5px; font-weight: 600; color: var(--mgk-navy); }
.mgk-checkout__voucher { display: flex; gap: 8px; margin: 4px 0 12px; }
.mgk-checkout__voucher-input { flex: 1; min-width: 0; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text); border-radius: var(--mgk-radius-sm); padding: 10px 12px; font-size: 14px; font-family: inherit; }
.mgk-checkout__voucher-input:focus { outline: none; border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-checkout__voucher-input:disabled, .mgk-checkout__voucher .mgk-btn:disabled { opacity: .5; cursor: default; }
.mgk-checkout__voucher-note { font-size: 12px; color: var(--mgk-text-3); margin: -8px 0 12px; }
/* Inline apply/remove result for the manual-entry form (replaces a floating
   toast for this one form) — red on any rejected code in the batch (nothing
   applies if even one is bad), green once the whole batch succeeds. */
.mgk-checkout__voucher-input.is-err { border-color: #F53F3F; color: #F53F3F; }
.mgk-checkout__voucher-input.is-ok { border-color: #009A29; color: #009A29; }
.mgk-checkout__voucher-msg { font-size: 12px; margin: -8px 0 12px; }
.mgk-checkout__voucher-msg.is-err { color: #F53F3F; }
.mgk-checkout__voucher-msg.is-ok { color: #009A29; }
/* Reuses .mgk-freshpicks__row's horizontal-scroll pattern (gap/overflow/no
   scrollbar) rather than a new one, just at a compact sidebar card width. */
.mgk-checkout__vouchers { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; margin: 0 0 16px; }
.mgk-checkout__vouchers::-webkit-scrollbar { display: none; }
.mgk-checkout__voucher-card { flex: 0 0 auto; min-width: 132px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); cursor: pointer; font-family: inherit; text-align: left; }
.mgk-checkout__voucher-card:hover { border-color: var(--mgk-teal); }
.mgk-checkout__voucher-card:disabled { opacity: .5; cursor: default; }
/* Applied/toggled-on state — clicking again removes it (a plain on/off
   toggle), so it needs to look visibly different from an unapplied chip. */
.mgk-checkout__voucher-card.is-active { border-color: var(--mgk-teal); background: var(--mgk-teal-bg); }
.mgk-checkout__voucher-card.is-active .mgk-checkout__voucher-desc { color: var(--mgk-teal); }
.mgk-checkout__voucher-desc { font-size: 12px; font-weight: 700; color: var(--mgk-text); }
.mgk-checkout__voucher-exp { font-size: 10px; color: var(--mgk-text-3); }

/* Two hidden-by-default states of the merged page — mgk-storefront.js's
   revealPaymentState() flips these once mgk_checkout_place_order succeeds
   (or the server already rendered straight into payment state for a
   ?order=&key= deep-link — see checkout.php's $mgk_has_order). */
.mgk-checkout__deliverystate { display: flex; flex-direction: column; gap: 16px; }
.mgk-checkout__deliverystate[hidden] { display: none; }
.mgk-checkout__paystate[hidden] { display: none; }

/* ── 023 Order Success / Payment Confirmed (S-010, pm-confirm.svg) ────── */
.mgk-success { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 64px); padding: 40px 16px; font-family: 'Quicksand', var(--mgk-font); }
.mgk-success__card { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 520px; padding: 36px 36px 30px; gap: 14px; background: #FFFFFF; box-shadow: 0px 6px 24px -4px rgba(15, 23, 41, 0.08); border-radius: 20px; position: relative; }
.mgk-success__check { width: 64px; height: 64px; flex: 0 0 auto; }
.mgk-success__invoice { position: absolute; top: 20px; right: 20px; display: block; color: #1B3A52; line-height: 0; }
.mgk-success__invoice:hover { opacity: .7; }
.mgk-success__heading { color: #061937; font-size: 25px; font-weight: 700; line-height: 31px; margin: 0; text-align: center; }
.mgk-success__msg { color: #8A9FB5; font-size: 13.5px; font-weight: 400; line-height: 17px; text-align: center; margin: 0; }
/* Itemised list + GST breakdown card (design: order-confirmed). Reuses the
   shared .mgk-gst__* rows, so only the item rows and the card shell around
   them are defined here. */
.mgk-success__order { width: 100%; padding: 18px 20px 14px; border: 1px solid #EDF1F6; border-radius: 14px; }
.mgk-success__items { display: flex; flex-direction: column; }
.mgk-success__item { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.mgk-success__item + .mgk-success__item { border-top: 1px solid #EDF1F6; }
.mgk-success__item-img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: #F6F8FB; }
.mgk-success__item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mgk-success__item-name { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 500; line-height: 19px; color: #1B3A52; }
.mgk-success__item-price { flex: 0 0 auto; font-size: 14px; font-weight: 700; line-height: 19px; color: #061937; white-space: nowrap; }
.mgk-success__gst { margin: 0; padding-top: 14px; border-top: 1px solid #EDF1F6; }
.mgk-success__reg { margin: 8px 0 0; font-size: 11.5px; line-height: 15px; color: #8A9FB5; }
.mgk-success__recap { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 16px 18px; gap: 9px; background: #F6F8FB; border-radius: 12px; }
.mgk-success__recap-row { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; }
.mgk-success__recap-label { font-size: 12px; font-weight: 500; line-height: 16px; color: #8A9FB5; }
.mgk-success__recap-val { font-size: 12px; font-weight: 500; line-height: 16px; color: #1B3A52; text-align: right; }
.mgk-success__track { display: flex; align-items: center; justify-content: center; width: 100%; padding: 14px 0; background: #1363FF; border-radius: 12px; color: #FFFFFF; font-size: 15px; font-weight: 700; line-height: 19px; text-decoration: none; }
.mgk-success__track:hover { opacity: .92; }
.mgk-success__home { color: #1B3A52; font-size: 13px; font-weight: 600; line-height: 16px; text-decoration: underline; }
/* Dual label on the one "home" link — see the note in order-success.php. Narrow
   ("Continue shopping", the mockup's wording) is off outside the phone skin, so
   desktop keeps reading "Back to home" exactly as before. */
.mgk-success__home-narrow { display: none; }
.mgk-success__help { color: #8A9FB5; font-size: 11.5px; font-weight: 400; line-height: 14px; text-align: center; margin: 0; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.mgk-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.mgk-grid--5, .mgk-grid--6 { grid-template-columns: repeat(3, 1fr); }
	/* Restated at (0,2,0) to match the desktop `.mgk-shop .mgk-grid` rule's
	   specificity — the bare .mgk-grid--N selectors above are (0,1,0) and
	   would lose to it, leaking the fluid auto-fit track into tablet. */
	.mgk-shop .mgk-grid { grid-template-columns: repeat(3, 1fr); }
	.mgk-sourcing__media { display: none; }
	.mgk-shop__grid,
	.mgk-pdp__grid,
	.mgk-weight__grid,
	.mgk-checkout__grid,
	.mgk-pay__grid { grid-template-columns: 1fr; }
	.mgk-shop__sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Cart's own breakpoint, higher than the shared 1024px above: the row's
   fixed-width stepper+price (120+90px) plus the "Remove" label need more
   headroom than the 2fr column has left in the ~1000-1024px band — Firefox
   (unlike Chromium) lets the row overflow there instead of reflowing, so
   "Remove" gets clipped by .mgk-cart__items' overflow:hidden. Stacking to
   1 column earlier avoids that band entirely. */
@media (max-width: 1180px) {
	.mgk-cart__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	.mgk-shop__sidebar { grid-template-columns: minmax(0, 1fr); }

	/* S-007 mobile: one compact app-like column. The desktop cart row reserves
	   302px for qty/price/remove; on a phone that must become a second row
	   beneath the product copy or it squeezes the name and escapes the card. */
	.mgk-cart { padding-top: 20px; padding-bottom: 32px; }
	.mgk-cart__back { margin: 0 0 18px; color: var(--mgk-text); font-size: 14px; }
	.mgk-cart__tabs { margin-bottom: 24px; }
	.mgk-cart__tab { padding: 10px 0 12px; margin-right: 24px; font-size: 17px; }
	.mgk-cart__tabs-count { padding: 10px 0 12px; font-size: 13px; }
	.mgk-cart__main { gap: 0; }
	.mgk-cart__head,
	.mgk-cart__main > .mgk-delivery { display: none; }
	.mgk-cart__items { border: 1px solid var(--mgk-border-lt); border-radius: 14px; }
	.mgk-cartrow { align-items: flex-start; gap: 14px; padding: 20px 16px; }
	.mgk-cartrow__media { width: 72px; height: 72px; border-radius: 11px; }
	.mgk-cartrow__body { align-items: stretch; flex-direction: column; gap: 10px; }
	.mgk-cartrow__top { gap: 4px; }
	.mgk-cartrow__name { font-size: 15px; line-height: 1.25; }
	.mgk-cartrow__sub { font-size: 12px; line-height: 1.35; }
	.mgk-cartrow__controls { width: 100%; flex: 0 0 auto; justify-content: space-between; gap: 10px; }
	.mgk-cartrow__controls .mgk-cartrow__line {
		order: 1; flex: 1 1 auto; text-align: left; font-size: 16px; white-space: nowrap;
	}
	/* flex-basis:auto, not a fixed 104px: the stepper's own contents are
	   40 + 2 + 32 + 2 + 40 = 116px, so a 104px basis left the "+" 12px short and
	   .mgk-qty's overflow:hidden sliced it in half. (104px fits the older 34px
	   buttons; the mockup's pill uses 40px ones.) Sizing to content means the
	   figures can't drift apart again — the row has ~256px to spend and the
	   price line beside it takes the remainder. */
	.mgk-cartrow__controls .mgk-qty { order: 2; flex: 0 0 auto; min-height: 38px; }
	.mgk-cartrow__controls .mgk-cartrow__remove { display: none; }
	.mgk-cart__aside { margin-top: 28px; }
	.mgk-cart__aside > .mgk-card:first-child { padding: 22px 14px; border-radius: 14px; }
	.mgk-cart__summary-title { font-size: 20px; }
	.mgk-cart__freeship { padding: 11px 12px; font-size: 13px; }
	.mgk-cart__checkout { min-height: 48px; justify-content: center; border-radius: 9px; }
	.mgk-cart__aside-secure { margin-top: 14px; }
	.mgk-fbt { margin-top: 30px; padding-top: 0; border-top: 0; }
	.mgk-fbt .mgk-sh { flex-direction: row; align-items: center; }
	.mgk-fbt .mgk-freshpicks__arrows { display: none; }
	.mgk-fbt__grid { margin-right: calc(var(--mgk-pad-x) * -1); padding-right: var(--mgk-pad-x); scroll-snap-type: x proximity; }
	.mgk-fbt__grid .mgk-prod { flex-basis: min(74vw, 280px); min-width: min(74vw, 280px); scroll-snap-align: start; }
}
@media (max-width: 720px) {
	:root { --mgk-pad-x: 16px; }
	.mgk-hide-sm { display: none; }
	/* Header collapses to rows: brand, utilities, then the nav links —
	   never hidden (they are the only way to reach Shop All / Categories /
	   Deals on a phone); when one line can't hold them they wrap to two. */
	.mgk-header { padding: 8px 16px; row-gap: 10px; }
	.mgk-header__right { flex: 1 1 100%; flex-wrap: wrap; }
	.mgk-header__search { max-width: none; }
	.mgk-header__nav { flex-wrap: wrap; gap: 8px 16px; }
	.mgk-grid--3, .mgk-grid--4, .mgk-grid--5, .mgk-grid--6 { grid-template-columns: repeat(2, 1fr); }
	/* Same (0,2,0) restatement as in the 1024px block above. */
	.mgk-shop .mgk-grid { grid-template-columns: repeat(2, 1fr); }
	.mgk-sh { flex-direction: column; }
	.mgk-promo, .mgk-autopilot { flex-direction: column; align-items: flex-start; }

	/* Burger + nav-dropdown mechanism used to be duplicated here AND in the
	   tablet block below. Removed from here: the tablet block (widened to
	   641-1024px) is now its single owner for every width that still needs
	   it — a copy here painted nothing anyway below 641px, since the ≤640px
	   Mobile App Skin block further down hides burger/nav outright and
	   nullifies .is-open regardless of what this block sets. */
	/* .mgk-header stays position:fixed here (not :relative) — fixed already
	   gives .mgk-header__nav's "position:absolute; top:100%" dropdown a
	   positioning context, and switching back to relative would undo the
	   pinned header on mobile. */
	body { padding-top: 110px; }

	/* .mgk-header__right (zone + search + lang + cart + user) never wrapped and
	   was wider than any phone screen, pushing the whole page into horizontal
	   scroll. Drop the least essential pills and shrink the search field so the
	   row actually fits — zone/language stay reachable via the nav + footer. */
	.mgk-header__right { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
	.mgk-header__zone, .mgk-header__lang { display: none; }

	/* Checkout/Payment: 3-across method cards and 2-across name/address fields
	   are too cramped once the grid drops to a single column on phones — stack
	   both, and drop the aside's sticky positioning since it no longer sits
	   beside the form (it would otherwise "stick" mid-scroll for no reason). */
	.mgk-checkout__methods, .mgk-pay__methods { grid-template-columns: 1fr; }
	.mgk-form__grid2 { grid-template-columns: 1fr; }
	.mgk-checkout__aside .mgk-card, .mgk-pay__aside .mgk-card { position: static; }
}
/* Single-row "icon-only search, no user/notifications" phone header — this
   IS the reference tablet look (confirmed against a real 712px-wide Galaxy
   Tab: ☰ · brand · search icon · cart, no bell/account), so it now covers
   the whole ≤1024px range instead of stopping at ≤640px. Below 640px the
   Mobile App Skin block further down still restyles every selector this
   touches into its own, separate 2-row design — unaffected, still wins
   there (later in source, verified nothing paints differently at any
   ≤640px width). 641-1024px is where this block now actually paints;
   the tablet block below only adds the ☰ dropdown mechanism on top (the
   one thing this width range needs that ≤640px doesn't, since ≤640px
   uses the bottom tab bar instead of a nav dropdown). */
@media (max-width: 1024px) {
	.mgk-header__search-input { width: 84px; }

	/* Mobile header (UI-html/home-mobie.svg): ☰ · "FreshMart" (text only,
	   logo mark + location line dropped) · 🔍 · 🛒 — no user/notifications
	   pill, and search collapses to just its icon (tapping it still submits
	   the empty-query GET to the search results page, same as desktop's
	   submit button; the full input only reappears once expanded — see
	   .mgk-header__search.is-expanded below, toggled by mgk-retail.js). */
	.mgk-header { justify-content: space-between; flex-wrap: nowrap; }
	.mgk-header__left { flex: 0 0 auto; gap: 0; }
	.mgk-header__burger { order: -1; }
	.mgk-header__brand { position: absolute; left: 50%; transform: translateX(-50%); }
	.mgk-header__logo, .mgk-header__location { display: none; }
	.mgk-header__brand-text { flex-direction: row; }
	.mgk-header__right { flex: 0 0 auto; flex-wrap: nowrap; row-gap: 0; }
	.mgk-header__notif-wrap, .mgk-header__notifications, .mgk-header__user, .mgk-header__user-wrap { display: none; }
	.mgk-header__search { background: none; border: none; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; justify-content: center; }
	.mgk-header__search-input, .mgk-header-suggest { display: none; }
	.mgk-header__search.is-expanded {
		position: fixed; left: 0; right: 0; top: 0; z-index: 501;
		width: auto; height: 56px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #ECEEF2;
	}
	.mgk-header__search.is-expanded .mgk-header__search-input { display: block; }
}
/* Tablet header (641-1024px): .mgk-header__nav is a fixed, non-shrinking
   404px (line ~341) and nothing collapses it on its own — below 641px the
   block above already handles everything (it now covers ≤1024px for the
   header's brand/search/notif/account styling), and above 1024px there's
   enough width for the full inline nav, but this whole middle band was
   left to the desktop layout, which crushes .mgk-header__search (its own
   flex-shrink:1, min-width:0) down to an unusable sliver once
   .mgk-header__left + .mgk-header__nav eat past ~700-1000px of it.
   This block's ONLY remaining job is the ☰ dropdown mechanism — the one
   thing 641-1024px needs on top of the block above that ≤640px doesn't
   (≤640px uses the bottom tab bar instead of a nav dropdown). Everything
   else (search icon-collapse, hidden notifications/account, brand
   position) now comes from the block above, so this stays a NEW,
   narrowly-scoped block rather than widening the ≤720px legacy phone
   block further up: that block (and the ≤1024px one above) also resize
   product grids, checkout/payment forms and the --mgk-pad-x section
   padding sitewide — none of which are broken here, and changing them for
   every tablet width was never asked for. */
@media (min-width: 641px) and (max-width: 1024px) {
	/* Without an explicit nowrap here, .mgk-header (base flex-wrap:wrap) wraps
	   .mgk-header__right onto an invisible second row at the narrow end of
	   this range (641-720px) — .mgk-header's own height stays a fixed 70px
	   (unaffected), so the wrapped row doesn't overflow the viewport's WIDTH
	   (scrollWidth stays clean) but silently renders ~60px further down,
	   overlapping whatever content follows the header. 721px+ happened to
	   clear this on its own; below that it doesn't, so state it explicitly
	   rather than depend on which side of a wrap threshold a given width
	   lands on. */
	.mgk-header { flex-wrap: nowrap; }
	.mgk-header__burger { display: inline-flex; align-items: center; }
	.mgk-header__nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0; z-index: 40;
		background: var(--mgk-navy-md); padding: 8px var(--mgk-pad-x); box-shadow: 0 8px 16px rgba(0,0,0,.25);
	}
	.mgk-header__nav.is-open { display: flex; }
	.mgk-header__nav li { border-top: 1px solid rgba(255,255,255,.1); }
	.mgk-header__nav li:first-child { border-top: 0; }
	.mgk-header__nav a { display: block; padding: 12px 4px; font-size: 15px; color: #fff; opacity: .85; }
	.mgk-header__nav-user { display: block; margin: -8px calc(var(--mgk-pad-x) * -1) 8px; border-top: 0 !important; background: rgba(255,255,255,.06); }
	.mgk-header__nav-user a { padding: 16px var(--mgk-pad-x); font-size: 17px; font-weight: 700; opacity: 1; }
}
@media (max-width: 460px) {
	/* Product grids stay at 2 columns down to the smallest phones — a
	   standard mobile listing layout, not a single-column stack. */
	/* Tighten the header utilities so zone+search+EN+cart+user hold one row.
	   The zone pill truncates ("Orchard · 23…") instead of pushing 👤 off. */
	.mgk-header__right { gap: 6px; }
	.mgk-header__pill:not(.mgk-header__search) { padding: 6px 10px; }
	.mgk-header__search { flex: 0 0 40px; padding: 0; }
	.mgk-header__zone { max-width: 112px; }
	.mgk-header__zone-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ════════════════════════════════════════════════════════════════════════════
 * S-001 Home — MOBILE APP SKIN
 * Source of truth: UI-html/FreshMart Mobile Standalone(1).html (the 390×844
 * standalone React prototype). Every value below — padding, radius, font size,
 * colour, gap — is transcribed from that file's inline styles rather than
 * derived, so the phone view matches it 1:1.
 *
 * DESKTOP IS UNTOUCHED: this whole block lives inside `max-width: 720px` and
 * every selector is scoped to a home-page section (.mgk-hero, .mgk-category,
 * .mgk-flashwrap, .mgk-promo, .mgk-quickreorder, .mgk-products, .mgk-abanner),
 * so nothing here can leak into the ≥641px layout or into other screens.
 *
 * BREAKPOINT: 640px, deliberately matching the existing home-mobile rules
 * (the section-reorder `order:` block and the trending 6-card cap near the end
 * of this file, plus the flashwrap scroll-row at ~490) rather than the 720px
 * used by the generic responsive section above. All of the home app-skin
 * pieces must switch on and off together — at 720px this block would restyle
 * the cards in the 641–720px band while the section ORDER stayed desktop, so
 * the phone layout would appear half-applied.
 *
 * The prototype's palette is its own — a #0E42D2 primary blue and #101828 ink,
 * NOT the storefront's --mgk-cta-blue/--mgk-navy tokens. Those literals are
 * intentional here: the ask was "đúng 100% style/màu sắc" against this mockup,
 * so the mockup's hex values win over the desktop tokens inside this block.
 * ════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
	/* Prototype palette (the mockup's literals, in one place so a colour change
	   is one edit, not thirty). Declared on :root because the header and the tab
	   bar are OUTSIDE the home sections — but only inside this media query, so
	   these custom properties simply don't exist on desktop. Defining a variable
	   affects nothing on its own; only the rules below that consume it do. */
	:root {
		--fm-blue:      #0E42D2;
		--fm-blue-dk:   #0B36AE;
		--fm-blue-bg:   #EFF4FF;
		--fm-blue-bd:   #DCE6FF;
		--fm-ink:       #101828;
		--fm-ink-2:     #344054;
		--fm-ink-3:     #475467;
		--fm-muted:     #667085;
		--fm-line:      #E4E7EC;
		--fm-red:       #D92D20;
		--fm-amber:     #FEC84B;
	}
	/* ── S-003 Search: phone-only search row + one-line result count ──────
	   Scoped through .mgk-shop--search (the identity hook noted in shop.php)
	   so Shop All and Category Landing, which render the same widget, are
	   untouched. Colours come from the phone skin's own tokens — --fm-blue is
	   the same #0E42D2 the product cards' "+" buttons use, so the Search
	   button reads as the same control family rather than a second blue. */
	.mgk-shop--search .mgk-shop__msearch {
		display: flex; align-items: center; gap: 10px;
		margin: 0; padding: 12px 16px 14px;
		background: #FFFFFF; border-bottom: 1px solid var(--fm-line);
	}
	.mgk-shop--search .mgk-shop__msearch-input {
		-webkit-appearance: none; appearance: none;
		flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 16px;
		background: #F2F4F7; border: 1px solid var(--fm-line); border-radius: 999px;
		font-family: inherit; font-size: 15px; color: var(--fm-ink);
	}
	.mgk-shop--search .mgk-shop__msearch-input::placeholder { color: var(--fm-muted); }
	.mgk-shop--search .mgk-shop__msearch-input:focus { outline: none; border-color: var(--fm-blue); background: #FFFFFF; }
	/* The browser's own clear "X" would sit on top of the pill's right edge. */
	.mgk-shop--search .mgk-shop__msearch-input::-webkit-search-decoration,
	.mgk-shop--search .mgk-shop__msearch-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
	.mgk-shop--search .mgk-shop__msearch-btn {
		flex: 0 0 auto; height: 44px; padding: 0 22px;
		background: var(--fm-blue); color: #FFFFFF;
		border: 0; border-radius: 999px; cursor: pointer;
		font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1;
	}
	.mgk-shop--search .mgk-shop__msearch-btn:active { background: #0B37AF; }
	/* One sentence replaces the stacked pair — see the note in shop.php. */
	.mgk-shop--search .mgk-shop__resultheading,
	.mgk-shop--search .mgk-shop__count { display: none; }
	.mgk-shop--search .mgk-shop__count--m {
		display: block; margin: 0;
		font-size: 13px; font-weight: 500; line-height: 18px; color: var(--fm-muted);
	}
	.mgk-shop--search .mgk-shop__resultsbar { gap: 0; }

	/* The mockup is one continuous white app canvas — no page background
	   showing through between sections, and no 32px section padding. */
	body.home, body.page-template-front-page { background: #FFFFFF; }
	.mgk-hero, .mgk-category, .mgk-flashwrap, .mgk-promo,
	.mgk-quickreorder, .mgk-products, .mgk-abanner { background: #FFFFFF; }

	/* ── 001 Header ─────────────────────────────────────────────────────
	   The mockup's app bar is a different composition from the phone header
	   this theme shipped (burger · centred brand · icons). It is:

	     row 1 (52px):  "FreshMart" 21px/700 with "Mart" in blue, and under it
	                    an 11.5px muted "Deliver to …" row with a blue ▾ —
	                    both LEFT aligned; bell + cart 40px icon buttons right.
	     row 2:         a full-width 42px search pill, #F7F8FA on a #E4E7EC
	                    hairline, 23px radius, 14px #98A2B3 placeholder.

	   So: un-centre the brand, bring back the location line as the address row,
	   drop the burger (the 5 destinations it held are now the bottom tab bar),
	   show the bell again, and let the search pill occupy its own row instead of
	   collapsing to an icon. Restyling beats re-templating here — every element
	   the mockup needs already exists in header.php. */
	/* Two explicit rows via flex order + a forced wrap (see __right's
	   `display:contents` below, which is what makes the search a sibling of the
	   brand and icons in the first place):
	     order 1  __left    brand + address     ─ row 1
	     order 2  bell
	     order 3  cart
	     order 4  __search  full-width pill     ─ row 2 (flex-basis 100% wraps it)
	   align-items:flex-start so the 52px brand block sets row 1's height and the
	   40px icons align to its top rather than stretching. */
	.mgk-header {
		/* Desktop's fixed height:70px (the 1440px spec's header-row baseline,
		   used so .mgk-header__search can size off it as a %) doesn't apply
		   here — this app bar is genuinely 2 rows (brand+icons, then the
		   full-width search pill below), so it needs to size to content again. */
		height: auto;
		flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
		gap: 0; padding: 6px 16px 12px; row-gap: 0;
		border-bottom: 0; box-shadow: 0 1px 0 rgba(16,24,40,.07);
	}
	/* Brand back to static/left — the shipped mobile rule absolutely centres it.
	   flex:1 1 auto lets it eat row 1's free space so the icons sit hard right. */
	.mgk-header__left { order: 1; flex: 1 1 auto; min-width: 0; gap: 0; }
	.mgk-header__brand {
		position: static; left: auto; transform: none;
		align-items: flex-start; gap: 0; min-height: 52px;
		flex-direction: column; justify-content: center;
	}
	.mgk-header__brand-text { flex-direction: column; min-width: 0; }
	.mgk-header__brand-name {
		font-family: 'Quicksand', var(--mgk-font);
		font-size: 21px; font-weight: 700; line-height: 1.05;
		letter-spacing: .2px; color: var(--fm-ink);
	}
	/* Two-tone wordmark — "Fresh" inherits the dark ink above, "Mart" goes blue.
	   Mobile only: desktop leaves the accent span inheriting its own colour. */
	.mgk-header__brand-accent { color: var(--fm-blue); }
	/* The address row: shown again (the shipped mobile rule hides it), restyled
	   to the mockup's 11.5px muted text. The pin icon isn't in the mockup — it
	   uses a trailing blue ▾ instead, supplied by ::after since the caret isn't
	   in the markup. */
	.mgk-header__location {
		display: flex; margin-top: 4px; padding: 0; max-width: 210px;
		font-size: 11.5px; font-weight: 600; color: var(--fm-muted);
		opacity: 1; gap: 4px; line-height: 1.2;
	}
	.mgk-header__location svg { display: none; }
	.mgk-header__location > span {
		overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	}
	.mgk-header__location::after {
		content: '▾'; color: var(--fm-blue); font-size: 10px; flex: 0 0 auto;
	}
	/* Burger + its storefront dropdown are retired on phones: the bottom tab bar
	   now owns Home/Categories/Deals/Orders/Account, and the mockup's app bar
	   has no menu button. Kept in the DOM (the nav markup is shared with
	   desktop) — just not displayed.
	   EXCEPTION — account screens: there the burger is not a storefront menu at
	   all, it toggles the .mgk-profile__nav account menu (see mgk-retail.js's
	   [data-mgk-nav-toggle] handler). That panel has no other phone trigger, so
	   hiding the burger outright would strand Addresses / Saved lists / Wallet /
	   Sign out. Keep it wherever that nav is on the page — :has() is supported
	   by every browser this app bar targets (Safari 15.4+, Chrome 105+). */
	.mgk-header__burger, .mgk-header__nav { display: none; }
	body:has(.mgk-profile__nav) .mgk-header__burger {
		display: inline-flex; align-items: center; order: 0;
		width: 40px; height: 40px; min-height: 52px; margin-left: -8px;
		justify-content: center; background: none; border: 0;
		color: var(--fm-ink); font-size: 20px; flex: 0 0 auto;
	}
	/* `.mgk-header__nav.is-open { display: flex }` in the ≤720px block is more
	   specific than the bare class above, so without this the dropdown would
	   still open if anything toggled the class (the burger is hidden, but
	   mgk-retail.js's handler is still bound). Keep it collapsed for good. */
	.mgk-header__nav.is-open { display: none; }
	/* CRITICAL: the search form is a CHILD of .mgk-header__right in header.php,
	   alongside the bell/cart. That nesting makes a full-width second row
	   impossible from inside — `flex:1 1 100%` on the form resolves against
	   __right (which is content-width), so the pill came out icon-sized and
	   wrapped inside the icon group instead of spanning the header.
	   `display: contents` dissolves the __right box so its three children
	   (bell wrap, cart, search form) become direct flex items of .mgk-header
	   brand · bell · cart on row 1 and the search on row 2 — matching the
	   mockup without reordering header.php's shared markup. */
	.mgk-header__right { display: contents; }
	/* Bell is visible again (mockup row 1 is bell + cart); account moves to the
	   Account tab, so its icon leaves the bar.
	   The bell lives inside .mgk-header__notif-wrap (a positioning context for
	   its badge + dropdown), so the WRAPPER is the flex item that needs the
	   order/height — not the <a> inside it. Signed-out shoppers get a bare
	   .mgk-header__notifications with no wrapper, hence the order on both. */
	.mgk-header__notif-wrap {
		display: flex; align-items: center;
		order: 2; flex: 0 0 auto; min-height: 52px;
	}
	.mgk-header__notifications { display: inline-flex; order: 2; }
	.mgk-header__user, .mgk-header__user-wrap { display: none; }
	.mgk-header__notifications, .mgk-header__cart {
		width: 40px; height: 40px; padding: 0; border-radius: 12px;
		background: none; color: var(--fm-ink); flex: 0 0 auto;
	}
	/* Cart is its own flex item on row 1, aligned with the bell. */
	.mgk-header__cart {
		order: 3; margin-right: -8px; min-height: 52px; height: 52px;
	}
	.mgk-header__notifications:active, .mgk-header__cart:active { background: #F2F4F7; }
	/* Icons: the theme's own header glyphs are FILLED artwork on 18×18 / 18×20
	   viewBoxes (fill-rule:evenodd paths), while the mockup draws stroked
	   outlines on a 0 0 24 24 grid — different geometry, not a different paint.
	   Forcing stroke/fill on the filled paths (what this rule used to do) just
	   produced a thin outline of the WRONG shape, so header.php now also emits
	   the mockup's real paths as `.mgk-icon-m` siblings and we swap which one
	   is visible. Desktop keeps its own artwork untouched. */
	.mgk-header__search-icon > svg:not(.mgk-icon-m),
	.mgk-header__icon > svg:not(.mgk-icon-m) { display: none; }
	/* Desktop's .mgk-header__icon becomes the badge's positioning context
	   (see base rules above) so the badge hugs the icon there. On phones the
	   badge is meant to sit inside the 40px button instead (see note by
	   .mgk-header__cart-count below), so hand the positioning context back
	   to .mgk-header__cart / .mgk-header__notifications, which are already
	   position:relative. */
	.mgk-header__icon { position: static; }
	/* fill/stroke MUST be restated here, not left to the svg's own attributes:
	   the desktop base rule `.mgk-header__cart svg, … { fill: currentColor;
	   stroke: none; width:18px; height:18px }` still applies at this width, and
	   CSS always beats presentational attributes — so fill="none"
	   stroke="currentColor" on the tag would lose and the outline would paint as
	   a solid blob at the wrong size. Sizes match the mockup per icon. */
	.mgk-header .mgk-icon-m {
		display: block; flex: 0 0 auto;
		fill: none; stroke: currentColor;
		stroke-linecap: round; stroke-linejoin: round;
	}
	.mgk-header__search-icon .mgk-icon-m { width: 18px; height: 18px; stroke-width: 2; }
	.mgk-header__notifications .mgk-icon-m { width: 21px; height: 21px; stroke-width: 1.8; }
	/* .mgk-header__cart .mgk-icon-m { width: 22px; height: 22px; stroke-width: 1.8; } -- orphaned: cart has no .mgk-icon-m sibling (would apply if a mobile stroke variant is added later) */
	/* Cart badge: blue pill, top-right inside the button (mockup), not the
	   red dot hanging off the corner. */
	.mgk-header__cart-count {
		top: 3px; right: 1px; min-width: 18px; width: auto; height: 18px;
		padding: 0 4px; border-radius: 9px; background: var(--fm-blue);
		color: #FFFFFF; font-size: 11px; font-weight: 700;
	}
	.mgk-header__notif-count {
		top: 8px; right: 9px; min-width: 9px; width: 9px; height: 9px; padding: 0;
		background: #B42318; border: 1.5px solid #FFFFFF; font-size: 0;
	}
	/* Search row: order 4 puts it after brand/bell/cart, and a 100% flex-basis
	   forces the wrap onto its own line. Now that __right is display:contents
	   this basis resolves against .mgk-header, so the pill is genuinely
	   full-width instead of icon-width (the bug this replaced).
	   display:flex re-declared because the ≤720px block turned it into a 40px
	   centred puck, and .mgk-header__pill's own inline-flex would otherwise
	   shrink-wrap it. */
	.mgk-header__search {
		order: 4; display: flex; flex: 0 0 100%; width: 100%; max-width: none;
		height: 42px; margin-top: 2px; padding: 0 15px; gap: 10px;
		background: #F7F8FA; border: 1px solid var(--fm-line); border-radius: 23px;
		justify-content: flex-start; align-items: center;
		/* .mgk-header__pill sets font-size:12px; the mockup's field text is 14px
		   and the input inherits from here. */
		font-size: 14px;
	}
	.mgk-header__search:focus-within { background: #F2F4F7; box-shadow: none; }
	.mgk-header__search-input {
		display: block; width: 100%; font-size: 14px; font-weight: 500; color: var(--fm-ink);
	}
	.mgk-header__search-input::placeholder { color: #98A2B3; font-weight: 500; }
	.mgk-header__search-icon { color: #98A2B3; flex: 0 0 auto; }
	.mgk-header__search-icon svg { width: 18px; height: 18px; stroke-width: 2; }
	/* NOTE on the search suggestion panel: the ≤720px block sets
	   `.mgk-header-suggest { display: none }` because the field there was an
	   icon-only puck with nothing to suggest against. No override is needed
	   here — the panel's own base rule (further down this file, so it wins on
	   source order at equal specificity) restores display:flex, and its
	   `[hidden]` companion keeps it closed until JS has results. */
	/* The icon-only header search had a JS "expand to a fixed overlay" mode
	   (mgk-retail.js toggles .is-expanded). The field is always visible now, so
	   that overlay would be a no-op at best and a stray fixed bar at worst —
	   neutralise it and let the pill keep its in-row appearance. */
	.mgk-header__search.is-expanded {
		position: static; height: 42px; padding: 0 15px;
		background: #F7F8FA; border: 1px solid var(--fm-line); border-bottom-width: 1px;
		/* The ≤720px rule pins this to the viewport (fixed/left/right/top/
		   z-index/width:auto); position:static above drops it out of that flow
		   but the offsets and z-index would still linger, so reset them too. */
		left: auto; right: auto; top: auto; z-index: auto; width: 100%;
	}
	/* Header is 2 rows now, not the single row body's padding-top was
	   written for; without this the hero starts underneath the app bar.
	   6 (pad-top) + 52 (brand/icon row) + 2 + 42 (search pill + margin)
	   + 12 (pad-bottom) = 114. No border-bottom to add (replaced by a
	   box-shadow, which doesn't occupy layout space). +20 for the same
	   breathing gap the desktop rule adds. */
	body { padding-top: 134px; }

	/* ── Bottom tab bar (shared/tabbar.php) ─────────────────────────────
	   Fixed 5-up bar: 6px 6px 18px padding (the 18px is the mockup's home
	   indicator inset), 50px min-height tabs, 22px icon over a 10.5px/700
	   label, inactive #667085 / active #0E42D2. Translucent white with a
	   hairline top border, above page content but below the header's own
	   z-index:500 so an expanded search still covers it. */
	.mgk-tabbar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
		display: flex; padding: 6px 6px 18px;
		background: rgba(255,255,255,.96);
		border-top: 1px solid rgba(228,231,236,.9);
		-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	}
	.mgk-tabbar__tab {
		flex: 1; min-height: 50px; display: flex; flex-direction: column;
		align-items: center; justify-content: center; gap: 3px;
		border-radius: 12px; padding: 0; text-decoration: none;
		color: var(--fm-muted); background: none;
	}
	.mgk-tabbar__tab:active { background: #F7F8FA; }
	.mgk-tabbar__tab.is-active { color: var(--fm-blue); }
	/* Mockup: 22px, stroke 2, round joins, inheriting the tab's active colour. */
	.mgk-tabbar__icon {
		width: 22px; height: 22px; flex: 0 0 auto;
		fill: none; stroke: currentColor; stroke-width: 2;
		stroke-linecap: round; stroke-linejoin: round;
	}
	.mgk-tabbar__label {
		font-size: 10.5px; font-weight: 700; line-height: 1; color: inherit;
	}
	/* Reserve the bar's height at the end of the page so the last section and
	   the footer stay reachable instead of sitting under fixed chrome.
	   Checkout is excluded: it strips the site chrome (body.mgk-is-checkout
	   also hides the header) and renders no tab bar, so reserving space there
	   would just leave a dead 74px gap under the pay button. */
	body:not(.mgk-is-checkout) { padding-bottom: 74px; }

	/* ── Section heading ("Shop categories" + "View all ›") ─────────────
	   17px/700 title, 12.5px muted sub, 13px blue link — and the title row
	   goes back to a ROW (the generic 720px rule above stacks it to a column,
	   which would drop "View all" onto its own line). */
	.mgk-category .mgk-sh,
	.mgk-flashwrap .mgk-sh,
	.mgk-promo .mgk-sh,
	.mgk-quickreorder .mgk-sh,
	.mgk-products .mgk-sh {
		flex-direction: row; align-items: flex-end; justify-content: space-between;
		gap: 12px; margin-bottom: 0;
	}
	.mgk-category .mgk-sh__title,
	.mgk-flashwrap .mgk-sh__title,
	.mgk-promo .mgk-sh__title,
	.mgk-quickreorder .mgk-sh__title,
	.mgk-products .mgk-sh__title {
		font-size: 17px; font-weight: 700; color: var(--fm-ink); letter-spacing: 0;
	}
	.mgk-category .mgk-sh__sub,
	.mgk-flashwrap .mgk-sh__sub,
	.mgk-promo .mgk-sh__sub,
	.mgk-quickreorder .mgk-sh__sub,
	.mgk-products .mgk-sh__sub {
		font-size: 12.5px; color: var(--fm-muted); margin: 3px 0 0; line-height: 1.35;
	}
	/* .mgk-quickreorder .mgk-sh > div:first-child (line ~569) fixes this block
	   at a desktop-only 518.33px (Figma spec, intentionally non-responsive
	   there). Below 640px it never shrinks, forcing the whole page — and every
	   position:fixed bar sized off it (.mgk-header, .mgk-tabbar) — wider than
	   the viewport for any shopper who sees this section (logged in with past
	   orders; quick-reorder.php returns early otherwise). Back to the same
	   flex:1 1 auto every other .mgk-sh > div:first-child already gets (line 38)
	   — mobile only, desktop's fixed frame is untouched. */
	.mgk-quickreorder .mgk-sh > div:first-child { flex: 1 1 auto; width: auto; min-width: 0; }
	/* ── "View all" links ───────────────────────────────────────────────
	   The mockup gives each section its own LABEL and its own TYPE SPEC, so
	   neither can be a single shared rule:

	     Shop categories     "View all ›"              13px/700,   pad 8px 0
	     Reorder essentials  "Order history ›"         12.5px/700, pad 10px 0 1px
	     Seasonal promotion  "N edits →"               11px/700,   pad 0
	     Flash Deals         "View all flash deals →"  13px/700 pill, see below
	     Popular in SG       (no CTA in the mockup)

	   All are #0E42D2, weight 700, nowrap, chrome-less.

	   Wording comes from mgk_cta_label() in inc/mgk-sections.php, which emits
	   the desktop text and the phone text as two spans; the swap below shows
	   exactly one. Earlier this was a CSS ::after glyph on a single label, but
	   that only works when the words match and only the arrow differs — it
	   can't turn "View all" into "Order history". */
	.mgk-cta__d { display: none; }
	.mgk-cta__m { display: inline; }
	/* NO-PHONE-WORDING FALLBACK. The swap above assumes a .mgk-cta__m always
	   exists to take over, but mgk_cta_label() emits it only when the phone
	   wording DIFFERS from the desktop text — an empty or identical $mobile
	   yields the __d span alone. Hiding __d unconditionally then leaves those
	   elements with no visible text at all.
	   That is not hypothetical: the category tiles pass a per-shelf short name
	   ("Fresh Meats" → "Meats") which only 8 of this store's 11+ categories
	   have, so Pantry / Biscuits & Cookies / Soft Drinks and the rest rendered
	   as bare grey circles over empty space on phone. Where there is no phone
	   variant, the desktop text IS the correct label — show it. */
	.mgk-cat-card__name:not(:has(.mgk-cta__m)) .mgk-cta__d { display: inline; }
	.mgk-sub__d { display: none; }
	.mgk-sub__m { display: block; }
	/* NB: no `display` in this group on purpose. Quick Reorder renders FOUR
	   tier-specific CTAs (--desktop/--tablet/--mobile-lg/--mobile-sm) and shows
	   exactly one per breakpoint via single-class `display:none` rules near the
	   top of this file. A two-class `.mgk-quickreorder .mgk-btn--link{display:…}`
	   here outranks those, which would un-hide all four and print the label
	   repeatedly. Visibility stays entirely with the existing tier rules. */
	.mgk-category .mgk-btn--link,
	.mgk-flashwrap .mgk-flashwrap__viewall,
	.mgk-promo .mgk-btn--link,
	.mgk-quickreorder .mgk-btn--link,
	.mgk-products .mgk-btn--link {
		color: var(--fm-blue); font-weight: 700; white-space: nowrap;
		text-decoration: none; background: none; border: 0; min-height: 0;
		font-size: 12.5px; padding: 10px 0 1px;
	}
	/* Shop categories — the one section the mockup gives 13px + 8px 0. */
	.mgk-category .mgk-btn--link { font-size: 13px; padding: 8px 0; }
	/* Seasonal promotion — smallest of the three, no padding. */
	.mgk-promo .mgk-btn--link { font-size: 11px; padding: 0; }
	/* Hover on desktop dims these to .75 opacity; on touch that reads as a
	   stuck state after tapping, and the mockup has no such treatment. */
	.mgk-category .mgk-btn--link:hover,
	.mgk-promo .mgk-btn--link:hover,
	.mgk-quickreorder .mgk-btn--link:hover,
	.mgk-products .mgk-btn--link:hover { opacity: 1; }
	/* "Popular in Singapore" has no View-all link in the mockup — its heading
	   row is title + sub only. Scoped to the trending widget so Today's Fresh
	   Picks (same .mgk-products class) is unaffected. */
	[data-widget_type="mgk_trending_products.default"] .mgk-products__cta { display: none; }

	/* ── 002 Hero ───────────────────────────────────────────────────────
	   Mockup: a 244px full-bleed image button, dark left-to-right scrim, and
	   the copy stack (kicker / 23px headline / sub / white pill) laid over it.
	   The theme ships the hero as a single flat baked image, so the overlay
	   copy doesn't exist in the DOM to restyle — what we CAN match exactly is
	   the frame: full-bleed, 244px tall, cropped rather than letterboxed. */
	/* Was a fixed 244px tall image with the copy assumed absent from the DOM.
	   The copy is real markup now, and real text at real sizes overflows 244px
	   on a 375px screen, so the height moved to a MIN on the copy column (set
	   in the 640px block above) and the image became its background. */
	.mgk-hero { padding: 0; }
	.mgk-hero .mgk-banner-ph { height: 244px; --mgk-banner-ph-ratio: auto; border-radius: 0; }

	/* ── 004 Category row ───────────────────────────────────────────────
	   Mockup: 64px-wide tap targets, a 54px tinted circle, 11px/600 label,
	   12px gap, edge-to-edge horizontal scroll with no visible scrollbar.
	   Heading row `padding:16px 16px 0`, tile row `padding:14px 16px 2px`. */
	/* Two-class selector on purpose. The desktop full-bleed rule near line 754
	   is `.mgk-section.mgk-category { padding-left: 24px; padding-right: 24px }`
	   — (0,2,0) longhand, which outranks a (0,1,0) `padding` shorthand no matter
	   that this block comes later. The old single-class rule here therefore only
	   ever landed its TOP/BOTTOM values; left/right stayed 24px and the row sat
	   8px right of every measurement taken from the mockup. Matching the
	   specificity is what makes 16px actually apply. */
	.mgk-section.mgk-category { padding: 16px 16px 0; }
	/* Elementor's own `.e-con` container (the widget's grandparent) carries a
	   default `padding: 10px`, which is only zeroed in the min-width:641px block
	   near line 830 — so on phone it silently adds 10px to every side. Left as-is
	   the section's 16px became 26px on screen. Zeroed here for the two sections
	   this pass covers rather than globally: the rest of the page hasn't been
	   re-measured against that change, and a blanket `.e-con { padding: 0 }`
	   would shift every phone section at once. */
	.elementor .e-con:has([data-widget_type="mgk_category_grid.default"]) { padding-left: 0; padding-right: 0; }
	/* Same shape as .mgk-promo__tiles above, and the same fix: no `width: 100%`
	   + double negative margin (these elements are content-box, so that combo
	   overflows by 2×16px and scrolls the left padding out of view). Start at the
	   parent's 16px gutter, bleed only the RIGHT edge so the last tile clears the
	   screen. */
	.mgk-catrow {
		gap: 12px; width: auto; margin: 0;
		padding: 14px 0 2px;
		margin-right: -16px;
		padding-right: 16px;
		scrollbar-width: none;
		align-items: flex-start;
	}
	.mgk-catrow::-webkit-scrollbar { display: none; }
	.mgk-cat-card { width: 64px; gap: 6px; }
	/* ONE uniform grey circle + slate glyph for every tile — #F5F6F8 / #475467,
	   the values the prototype actually renders (its per-shelf colour map is
	   overwritten before paint; see the note in category-grid.php). Every tile is
	   identical — grey circle, merchant emoji — so the row reads as one set. */
	.mgk-cat-card__media {
		width: 54px; height: 54px; border-radius: 27px;
		background: #F5F6F8; color: #475467;
		box-shadow: inset 0 0 0 1px rgba(16,24,40,.04);
	}
	/* Every tile shows the merchant-set emoji, same icon as desktop — sized to
	   the 54px circle. (The mockup's stroked SVG glyphs are not used: it only has
	   artwork for 8 shelves against this store's 11 categories, so they produced
	   a half-drawn/half-emoji row. See category-grid.php.) */
	.mgk-cat-card__icon { font-size: 28px; line-height: 1; }
	.mgk-cat-card__img--ph { border-radius: 27px; }
	/* "See all" tile — grey circle, blue chevron, blue label. */
	.mgk-cat-card--all { display: flex; }
	.mgk-cat-card--all .mgk-cat-card__media {
		background: #F5F6F8; box-shadow: inset 0 0 0 1px #EAECF0; color: var(--fm-blue);
	}
	.mgk-cat-card--all .mgk-cat-card__chev { font-size: 18px; font-weight: 700; line-height: 1; }
	.mgk-cat-card--all .mgk-cat-card__name { color: var(--fm-blue); }
	/* text-align:center is load-bearing, not decoration: the tile is a 64px
	   flex COLUMN, so a label narrower than 64px would otherwise sit left-aligned
	   under a centred circle. The mockup states it explicitly on this element.
	   min-height reserves the two lines the longest un-abbreviated names need
	   ("Biscuits & Cookies", "Household Essentials") so a one-line tile and a
	   two-line tile still bottom out level, keeping the row of circles on one
	   baseline instead of stepping up and down. */
	.mgk-cat-card__name {
		font-size: 11px; font-weight: 600; color: var(--fm-ink-2); line-height: 1.2;
		text-align: center; width: 100%; min-height: 26px;
		display: block; word-break: break-word;
	}

	/* ── Flash Deals ────────────────────────────────────────────────────
	   Mockup: the whole block sits on a #EFF4FF band that bleeds to both
	   screen edges — not the desktop cream card with the amber border. Title
	   is the blue "FLASH SALE" lockup, the countdown becomes 27×29px chips
	   (first outlined, rest solid blue), and the cards are a 2-up swipe row. */
	/* FULL-BLEED band, per the mockup (`margin:20px 0 0;background:#EFF4FF` with
	   no side padding anywhere in its chain). An earlier revision kept a 16px
	   gutter and 16px corners to line the band up with the sections above and
	   below; that has been overruled in favour of the design — the band is meant
	   to break the page's gutter and run edge to edge, which is what makes it
	   read as a distinct campaign surface rather than another white card.
	   Zero side padding on the section, square corners, and the two inherited
	   insets both cancelled: the desktop (0,2,0) 24px longhand near line 754
	   (matched at equal specificity, same reason as .mgk-category above) and
	   Elementor's default 10px `.e-con` padding, which is only zeroed in the
	   min-width:641px block near line 830 and so is still live here. Without the
	   .e-con override the band would stop 10px short of both edges — visibly
	   not full-bleed. */
	.mgk-section.mgk-flashwrap { padding: 20px 0 0; }
	.elementor .e-con:has([data-widget_type="mgk_flash_deals.default"]) { padding-left: 0; padding-right: 0; }
	.mgk-flashwrap__box {
		background: var(--fm-blue-bg); border: 0; box-shadow: none; border-radius: 0;
		padding: 0 0 4px; overflow: hidden;
	}
	/* The head is a 64px #F4F7FF strip acting as the positioning context for
	   three absolutely-placed pieces, exactly as the mockup composes it: the
	   angled ribbon at left:0, the bolt straddling its diagonal at left:191px,
	   and the countdown pinned right. Absolute (not flex) because the ribbon
	   and bolt deliberately OVERLAP — flex would space them apart. */
	.mgk-flashwrap__head {
		position: relative; display: block; flex-wrap: nowrap; gap: 0;
		margin-bottom: 0; padding: 0; background: #F4F7FF;
		height: 64px; min-height: 64px; overflow: hidden;
	}
	.mgk-flashwrap__head-left { display: contents; }
	/* Desktop's plain text heading gives way to the ribbon lockup here. */
	.mgk-flashwrap__title { display: none; }
	.mgk-flashwrap__lockup { display: block; }
	.mgk-flashwrap__ribbon-bg {
		position: absolute; left: 0; top: 0; width: 218px; height: 60px;
	}
	.mgk-flashwrap__lockup-txt {
		position: absolute; left: 10px; top: 0; height: 58px;
		display: flex; align-items: center; gap: 5px;
		color: #FFFFFF; white-space: nowrap;
	}
	.mgk-flashwrap__mall { font-size: 11px; font-weight: 800; letter-spacing: .25px; }
	.mgk-flashwrap__pctmark { width: 20px; height: 20px; flex: 0 0 auto; }
	.mgk-flashwrap__flash {
		font-size: 17px; font-weight: 700; font-style: italic; letter-spacing: -.3px;
	}
	.mgk-flashwrap__sale { font-size: 15px; font-weight: 500; letter-spacing: .2px; }
	/* Straddles the ribbon's diagonal cut — top:-3px/height:69px overflow the
	   58px ribbon on purpose, which is why the head clips with overflow:hidden. */
	.mgk-flashwrap__bolt {
		position: absolute; left: 191px; top: -3px; width: 36px; height: 69px;
		filter: drop-shadow(0 4px 5px rgba(14,66,210,.25));
	}
	.mgk-flashwrap__countdown {
		position: absolute; right: 8px; top: 0; height: 59px;
		display: flex; align-items: center; gap: 5px;
		font-variant-numeric: tabular-nums;
	}
	.mgk-flashwrap__endsin {
		display: block; font-size: 7.5px; font-weight: 800; letter-spacing: .3px;
		color: var(--fm-blue); text-align: right; white-space: nowrap;
	}
	/* Each chip stacks over its HRS/MIN/SEC caption; the three stacks and the
	   two colons sit in one flex row, top-aligned so the colons line up with
	   the chips rather than the captions. */
	.mgk-flashwrap__seg-wrap {
		display: flex; flex-direction: column; align-items: center; gap: 3px;
	}
	.mgk-flashwrap__countdown { align-items: flex-start; padding-top: 15px; }
	.mgk-flashwrap__endsin { margin-top: 7px; }
	.mgk-flashwrap__seg {
		min-width: 27px; height: 29px; padding: 0; border-radius: 7px;
		display: inline-flex; align-items: center; justify-content: center;
		background: var(--fm-blue); color: #FFFFFF;
		box-shadow: 0 3px 8px rgba(14,66,210,.16);
	}
	/* HRS chip is outlined-on-white, MIN/SEC solid blue. Keyed off the wrapper's
	   position (not .mgk-flashwrap__seg:first-child, which no longer matches now
	   that each chip is wrapped in its own caption stack). */
	.mgk-flashwrap__seg-wrap:first-of-type .mgk-flashwrap__seg {
		background: linear-gradient(180deg,#FFFFFF,#EDF3FF); color: var(--fm-blue);
		box-shadow: inset 0 0 0 1.5px var(--fm-blue), 0 3px 8px rgba(14,66,210,.1);
	}
	.mgk-flashwrap__seg .mgk-sale__clock-num { font-size: 13px; font-weight: 800; color: inherit; }
	.mgk-flashwrap__cap {
		display: block; font-size: 6px; font-weight: 800; color: var(--fm-blue);
	}
	.mgk-flashwrap__colon {
		height: 29px; display: flex; align-items: center;
		color: var(--fm-blue); font-size: 13px; font-weight: 800;
	}
	/* The ribbon strip has no room left for "View all N deals", and the link is
	   a child of __head (desktop needs it there for its space-between push), so
	   it can't be reordered below the grid with `order`. Hide it here and let
	   the mobile-only sibling pill after the grid carry the same destination —
	   which is also where the mockup puts it. */
	.mgk-flashwrap__head .mgk-flashwrap__viewall { display: none; }
	.mgk-flashwrap__viewall--mobile {
		display: block; margin: 4px auto; min-width: 170px; padding: 0 18px;
		height: 42px; border-radius: 22px; background: transparent;
		font-size: 13px; font-weight: 700; color: var(--fm-blue);
		text-align: center; line-height: 42px; text-decoration: none;
	}
	.mgk-flashwrap__viewall--mobile:active { background: rgba(14,66,210,.07); }
	/* The mockup's 16px, restored now that the band is full-bleed: with the band
	   itself at x=0 this puts the first card at x=16, in line with the category
	   tiles and every other row's first item. (It was 12px while the band carried
	   its own 16px inset, where 16+16 would have pushed the card to x=32.) */
	.mgk-flashwrap__grid {
		display: flex; grid-template-columns: none; max-width: none; width: auto; gap: 10px;
		padding: 10px 16px 5px; overflow: visible; overflow-x: auto;
		scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none;
		/* Without this the 16px left padding above is thrown away on load. The
		   cards carry `scroll-snap-align: start`, and the default
		   `scroll-padding: auto` resolves "start" to the scrollport's PADDING-box
		   edge — so the browser immediately scrolls the row 16px to sit the first
		   card flush against the screen, leaving it at x=0 while every other row
		   on the page starts at x=16. Declaring the snap inset explicitly keeps
		   the padding intact and the first card aligned with the category tiles.
		   (Only visible once the band went full-bleed: while the band was inset
		   16px the stolen padding was masked by the band's own gutter.) */
		scroll-padding-left: 16px;
	}
	.mgk-flashwrap__grid::-webkit-scrollbar { display: none; }
	/* calc((100% - 42px)/2) with a 158–176px clamp — the mockup's exact
	   "just under two cards visible, third one peeking" sizing. */
	.mgk-flashcard {
		flex: 0 0 calc((100% - 42px) / 2); min-width: 158px; max-width: 176px;
		border: 1px solid var(--fm-line); border-radius: 16px;
		box-shadow: 0 8px 18px rgba(16,24,40,.09); scroll-snap-align: start;
	}
	/* Phone cards are clamped to 158-176px wide and the mockup wants a squatter
	   110px photo, not the desktop 16/11 shape — so aspect-ratio (and the
	   desktop min-height that would otherwise floor this at 132px) is reset to
	   auto explicitly rather than left to fight the fixed height. */
	.mgk-flashcard__media { height: 110px; aspect-ratio: auto; min-height: 0; border-radius: 15px 15px 0 0; background: #F6F3EE; }
	/* No phone height override any more. This used to force --mgk-saletag-h:28px
	   because the shared rule was a fixed 40px, which took ~40% of a 96-110px
	   mobile photo. The shared rule is now the artwork's ratio, so the strip
	   scales with card width on its own: a ~158-176px phone card yields a 34-38px
	   strip, close to the 28px this was hand-tuned to and reached without a
	   second magic number to keep in sync. */

	/* PHONE — the campaign banner is kept everywhere now, including outside Flash
	   Sale. It used to be hidden here for exactly the crop this change removes:
	   the strip was a fixed HEIGHT, so on the 258px cards these sections use its
	   box ratio hit 9.2 against the artwork's 4.7 and object-fit:cover threw away
	   49% of the WIDTH — "FREESHIP" and "VOUCHER 50%" were cut off mid-word,
	   advertising a partial, misleading offer, and hiding the banner was the
	   safer of two bad options.
	   With the box on the artwork's own ratio there is no crop to be misled by,
	   and the two rejected knobs no longer apply: nothing needs raising to 55px
	   (height is derived, not chosen), and contain cannot letterbox into an empty
	   band because the box is the artwork's shape. The top-left % chip still
	   states the discount independently. */

	/* No mobile-specific rule for the top-left chip: it is the sale PERCENTAGE at
	   every viewport now (see the corner-badge convention at .mgk-prod__pct), so
	   the desktop markup is already correct here and the earlier phone-only
	   SAVE-to-% swap has been removed rather than kept as a duplicate. */
	/* The hero is NOT a large card at this width: the ≤640px block turns its
	   wrapper into an ordinary grid cell (grid-column:auto), so it renders ~171px
	   wide with a 108px photo, same as the grid deals beside it. It needed a 28px
	   override while the strip was a fixed 40px (which covered ~37% of that photo);
	   the shared ratio now gives it ~36px at 171px wide, in proportion with its
	   neighbours automatically, so the override is gone. */
	.mgk-flashcard__pct {
		top: 9px; left: 8px; font-size: 10.5px; font-weight: 800;
		padding: 4px 7px; border-radius: 7px; background: var(--fm-red); box-shadow: none;
	}
	.mgk-flashcard__ribbon {
		top: 9px; right: 8px; background: var(--fm-blue); font-size: 8px; font-weight: 700;
		letter-spacing: .5px; padding: 4px 7px; border-radius: 10px;
	}
	.mgk-flashcard__body { padding: 10px; gap: 7px; }
	.mgk-flashcard__badges { gap: 4px; min-height: 19px; }
	.mgk-flashcard__badges .mgk-chip {
		padding: 3px 7px; border-radius: 9px; background: #F2F4F7; color: var(--fm-ink-2);
		font-size: 9px; font-weight: 800; line-height: 1.2;
	}
	.mgk-flashcard__name {
		font-size: 13px; font-weight: 600; color: var(--fm-ink); line-height: 1.28;
		min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2;
		-webkit-box-orient: vertical; overflow: hidden;
	}
	/* Sold/left labels above a red-track bar with an amber→red fill. */
	.mgk-flashcard__progress { gap: 5px; }
	.mgk-flashcard__labels { font-size: 9px; }
	.mgk-flashcard__labels span:first-child { color: #C4320A; font-weight: 800; }
	.mgk-flashcard__labels span:last-child { color: var(--fm-ink-2); font-weight: 800; }
	.mgk-flashcard__track { height: 5px; border-radius: 3px; background: #FEE4E2; }
	.mgk-flashcard__track span { background: linear-gradient(90deg,#F79009,#D92D20); border-radius: 3px; }
	.mgk-flashcard__price { gap: 6px; align-items: baseline; }
	.mgk-flashcard__now { font-size: 16px; font-weight: 800; color: var(--fm-blue); }
	.mgk-flashcard__was { font-size: 10.5px; font-weight: 600; color: var(--fm-muted); }
	/* Mockup's flash card has ONE full-width pill CTA, no square +/heart
	   sibling — so the icon button is dropped rather than shrunk. */
	.mgk-flashcard__cta { gap: 0; }
	.mgk-flashcard__addicon { display: none; }
	.mgk-flashcard__buy {
		height: 37px; padding: 0; border-radius: 19px; background: var(--fm-blue);
		font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
	}
	/* Desktop's hover lift/darken doesn't exist in the mockup (and hover is
	   meaningless on touch) — neutralise it at the same 2-class specificity. */
	.mgk-flashcard:hover { box-shadow: 0 8px 18px rgba(16,24,40,.09); border-color: var(--fm-line); }
	.mgk-flashcard:hover .mgk-flashcard__buy { background: var(--fm-blue); }
	.mgk-flashcard__buy:active { transform: scale(.98); background: var(--fm-blue-dk); }
	.mgk-flashcard__wish {
		height: 37px; padding: 0; border-radius: 19px; font-size: 12px; font-weight: 800;
	}

	/* ── 006 Promo / Seasonal tiles ─────────────────────────────────────
	   Mockup: 158×184px portrait tiles, 17px radius, bottom-anchored white
	   copy over a top-transparent→dark gradient, in a swipe row. */
	/* Mockup's seasonal heading row is `padding: 2px 16px 0` — the visual gap
	   above it comes from the preceding Reorder block's 22px bottom margin, not
	   from this section's own top padding (which was 22px here and double-spaced
	   the two). */
	.mgk-promo { padding: 2px 16px 0; flex-direction: column; align-items: stretch; }
	/* Edge-bled swipe row. The desktop rule sets `width: 100%`, and these
	   elements are NOT border-box (the global `box-sizing: border-box` is scoped
	   to `.mgk-fm *`, which the home sections are not inside). So width:100% is
	   the CONTENT width, and adding 32px of side padding made the box 32px wider
	   than its parent; with `overflow-x: auto` the extra spilled off the right
	   and the left padding scrolled out of view, leaving the first tile flush at
	   x=0 while the heading above it sat at x=16.
	   Fix: drop the negative margin and the width override, and inset only the
	   right edge so the last tile can still scroll clear of the screen. The row
	   then starts at the parent's own 16px gutter, in line with the heading. */
	.mgk-promo__tiles {
		gap: 12px; width: auto; margin: 0;
		padding: 10px 0 8px;
		margin-right: calc(var(--mgk-pad-x) * -1);
		padding-right: var(--mgk-pad-x);
		scroll-snap-type: x proximity; scrollbar-width: none;
	}
	.mgk-promo__tiles::-webkit-scrollbar { display: none; }
	.mgk-promo-tile {
		flex: 0 0 158px; width: 158px; min-height: 184px; height: 184px;
		border-radius: 17px; padding: 12px; scroll-snap-align: start;
		justify-content: flex-end; gap: 4px;
		color: #FFFFFF; text-shadow: none; background-color: var(--fm-ink);
	}
	/* One shared scrim for every tile variant so the white copy stays legible
	   on any artwork — replaces the desktop tiles' light wash, which was built
	   for dark-on-light text. */
	.mgk-promo-tile::after {
		content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit;
		background: linear-gradient(180deg, rgba(16,24,40,.04) 20%, rgba(16,24,40,.88) 100%);
	}
	.mgk-promo-tile > * { position: relative; z-index: 1; }
	.mgk-promo-tile--amber, .mgk-promo-tile--green, .mgk-promo-tile--teal,
	.mgk-promo-tile--red, .mgk-promo-tile--sfa, .mgk-promo-tile--seasonal {
		background-image: var(--mgk-promo-tile-bg, none);
	}
	.mgk-promo-tile__heading {
		font-size: 15.5px; font-weight: 700; line-height: 1.16; color: #FFFFFF;
	}
	.mgk-promo-tile__sub {
		font-size: 10.5px; font-weight: 500; text-transform: none; line-height: 1.35;
		color: rgba(255,255,255,.88); margin-bottom: 0;
	}
	/* Tag chip moves to the tile's top-LEFT as a white pill (the desktop
	   pill is a dark top-right badge). */
	.mgk-promo-tile__cta {
		top: 10px; left: 10px; right: auto;
		background: rgba(255,255,255,.9); color: var(--fm-ink);
		font-size: 8.5px; font-weight: 700; letter-spacing: .9px;
		padding: 4px 7px; border-radius: 10px;
	}
	.mgk-promo-tile__code { font-size: 11px; padding: 4px 10px; }
	.mgk-promo-tile__meta { color: rgba(255,255,255,.8); }

	/* ── 043 Quick Reorder ──────────────────────────────────────────────
	   Mockup: 286px-wide cards on a blue-tinted gradient with a #DCE6FF
	   border, three overlapping 50px thumbs, and a full-width blue pill. */
	.mgk-quickreorder { padding: 0 16px 22px; }
	/* Right-edge bleed only — same reasoning as .mgk-catrow / .mgk-promo__tiles
	   (content-box + width:100% + two-sided negative margin overflowed and
	   scrolled the left padding away). */
	.mgk-quickreorder__row {
		display: flex; grid-template-columns: none; gap: 12px;
		width: auto; margin: 0;
		padding: 12px 0 5px;
		margin-right: calc(var(--mgk-pad-x) * -1);
		padding-right: var(--mgk-pad-x);
		overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
	}
	.mgk-quickreorder__row::-webkit-scrollbar { display: none; }
	/* Every card is visible in the swipe row. (Kept as an explicit display:grid
	   because the card's phone layout below is a 2×2 grid, and this also
	   re-asserts it over any earlier display value.) */
	.mgk-quickreorder__row > .mgk-quickreorder-card { display: grid; }
	.mgk-quickreorder-card {
		flex: 0 0 286px; width: 286px; scroll-snap-align: start;
		/* GRID, not a flex column: the mockup pairs thumbs↔LAST ORDERED on row 1
		   and name/items↔total on row 2, each pair sharing a line with the second
		   item right-aligned (lines 2369-2380). A single-axis column cannot put
		   two children side by side, and the pill still spans both tracks. */
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center; gap: 0;
		/* Desktop's Figma card sets min-height:126px; this phone card sizes to
		   its own stacked content. */
		min-height: 0;
		border: 1px solid var(--fm-blue-bd); border-radius: 18px; padding: 14px;
		background: linear-gradient(145deg,#FFFFFF 0%,#F7F9FF 100%);
		box-shadow: 0 8px 22px rgba(14,66,210,.08);
	}
	/* Overlapping avatar stack: 10px left padding cancels the first thumb's
	   -10px pull so the group still starts flush with the card padding. */
	/* Explicit grid placement re-places the desktop Figma card, which is also a
	   grid but a different one: name spanning row 1 (`grid-area: 1/1/2/3`) with
	   the thumb strip and round "+" paired in row 2. The phone card is two
	   paired rows plus a full-width pill, so every child is re-assigned here.
	   These grid-column/grid-row longhands come after the desktop grid-area
	   shorthands in the file, which is what lets them win at equal specificity. */
	.mgk-quickreorder-card__media {
		grid-column: 1; grid-row: 1;
		display: flex; align-items: center; padding-left: 10px; width: auto; height: auto;
	}
	/* Row 1 right: LAST ORDERED over the date, right-aligned (mockup line 2375). */
	.mgk-quickreorder-card__last {
		grid-column: 2; grid-row: 1;
		display: block; text-align: right; min-width: 0;
	}
	.mgk-quickreorder-card__last-label {
		display: block;
		font-size: 9.5px; font-weight: 700; letter-spacing: .75px;
		color: var(--fm-muted); text-transform: uppercase;
	}
	.mgk-quickreorder-card__last-date {
		display: block; margin-top: 3px;
		font-size: 12px; font-weight: 600; color: var(--fm-ink-2);
	}
	/* Compound selector (not the bare class) so this beats the 640px block's
	   `__thumb + __thumb { margin-left: -8px }`, which is more specific than a
	   single class and would otherwise keep the old 8px overlap. */
	.mgk-quickreorder-card .mgk-quickreorder-card__thumb {
		width: 50px; height: 50px; margin-left: -10px; border-radius: 14px;
		border: 2px solid #FFFFFF; background: #F2F4F7; overflow: hidden; flex: 0 0 auto;
		box-shadow: 0 3px 8px rgba(16,24,40,.12);
	}
	.mgk-quickreorder-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
	/* Orders with no product images fall back to a single 🛒 span — centre it
	   in the 50px tile so it reads as a thumbnail, not a clipped glyph. */
	.mgk-quickreorder-card__ph {
		display: flex; align-items: center; justify-content: center; font-size: 22px;
	}
	/* Row 2 left: order number over "N items from this basket". align-self:start
	   so a two-line body doesn't drag the total off the number's baseline. */
	.mgk-quickreorder-card__body {
		grid-column: 1; grid-row: 2; align-self: start;
		margin-top: 13px; display: block; min-width: 0;
	}
	.mgk-quickreorder-card__name {
		font-size: 14.5px; font-weight: 700; color: var(--fm-ink); line-height: 1.2;
	}
	.mgk-quickreorder-card__items {
		display: block; margin-top: 3px;
		font-size: 12px; color: var(--fm-muted);
	}
	/* Row 2 right: the basket total, aligned to the order number's line. */
	.mgk-quickreorder-card__total {
		grid-column: 2; grid-row: 2; align-self: start;
		display: block; margin-top: 13px;
		font-size: 15px; font-weight: 700; color: var(--fm-ink); white-space: nowrap;
	}
	/* The "+" icon button becomes the mockup's full-width "Reorder N items →"
	   pill. font-size:0 hides the literal "+" text node in the PHP (kept so the
	   desktop round icon button is unchanged) while ::after supplies the label. */
	.mgk-quickreorder-card__add {
		/* Spans both tracks as the card's third row. The desktop rule places this
		   at `grid-area: 2 / 2 / 3 / 3` with align-self:end / justify-self:start —
		   a small round "+" beside the thumb strip — so all three are restated
		   here to re-place the phone's full-width pill. justify-self:stretch is
		   what lets width:100% fill both tracks rather than shrink to content. */
		grid-column: 1 / -1; grid-row: 3;
		align-self: stretch; justify-self: stretch;
		order: 0; margin-top: 13px; margin-left: 0; width: 100%; height: 42px; border: none; border-radius: 22px;
		background: var(--fm-blue); color: #FFFFFF; font-weight: 700; font-size: 0;
		display: flex; align-items: center; justify-content: center;
		box-sizing: border-box; padding: 0; flex: 0 0 auto;
	}
	/* Label carries the item count ("Reorder 4 items →", mockup line 2381). It is
	   pluralised in PHP and passed as an attribute, so the count never has to be
	   built in CSS. Falls back to the bare word if the attribute is absent. */
	.mgk-quickreorder-card__add::after {
		content: 'Reorder  →'; font-size: 13.5px; font-weight: 700; white-space: pre;
	}
	.mgk-quickreorder-card__add[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label) '  →';
	}
	/* Beats `.mgk-quickreorder-card:hover .mgk-quickreorder-card__add`'s
	   desktop #0D3985 (2 classes), which a bare class above cannot. */
	.mgk-quickreorder-card:hover .mgk-quickreorder-card__add { background: var(--fm-blue); }
	.mgk-quickreorder-card__add:active { transform: scale(.98); background: #0B35A8; }
	/* Guest prompt card — same blue-tinted panel as the reorder cards. */
	.mgk-quickreorder__signin {
		flex-direction: column; align-items: flex-start; gap: 4px;
		margin: 12px 0 0; padding: 16px; border-radius: 16px;
		background: #FFFFFF; border: 1px solid var(--fm-line);
	}
	.mgk-quickreorder__signin-title { font-size: 17px; font-weight: 700; color: var(--fm-ink); }
	.mgk-quickreorder__signin-sub { font-size: 14px; color: var(--fm-ink-3); line-height: 1.5; }
	.mgk-quickreorder__signin-cta {
		margin-top: 12px; height: 40px; padding: 0 22px; border-radius: 24px;
		background: var(--fm-blue); color: #FFFFFF; font-size: 15px; font-weight: 700;
		display: inline-flex; align-items: center; justify-content: center;
	}

	/* ── 006b Appliance banner ──────────────────────────────────────────
	   Real copy/CTAs need a content-led height on phone; the old fixed 168px
	   image card could only work while the words were baked into its pixels. */
	.mgk-section.mgk-abanner {
		--mgk-abanner-ratio: auto; min-height: 300px;
		margin: 14px 16px 18px; padding: 0; border-radius: 19px;
		box-shadow: 0 10px 26px rgba(14,66,210,.14);
	}
	.mgk-abanner .mgk-abanner__img {
		position: absolute; inset: 0; width: 100%; height: 100%;
		aspect-ratio: auto; object-fit: cover; object-position: left center;
		border-radius: inherit;
	}
	.mgk-abanner__inner { min-height: 300px; padding: 24px 5%; }
	.mgk-abanner__content { font-size: 13.5px; }
	.mgk-abanner__heading { max-width: 10em; font-size: 2.25em; }
	.mgk-abanner__sub { max-width: 21em; }
	.mgk-abanner__btn { min-width: 0; }

	/* ── 005/005b Product grids ─────────────────────────────────────────
	   Mockup: a 2-column grid of 14px-radius cards, 100px image, cert chips
	   in green above a 2-line name, and price + a 40px round "+" on one row.
	   Every rule is prefixed with `.mgk-products` on purpose: .mgk-prod is the
	   shared card atom used by Shop, Search, PDP recommendations, Wishlist,
	   Seasonal and the cart's FBT strip. Restyling it bare would repaint those
	   screens on mobile too, and the brief is home-only. */
	.mgk-products { padding: 16px 16px 0; }
	.mgk-products .mgk-grid {
		grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 0 16px;
	}
	.mgk-products .mgk-prod { border: 1px solid var(--fm-line); border-radius: 14px; }
	.mgk-products .mgk-prod:hover { border-color: var(--fm-line); box-shadow: none; }
	.mgk-products .mgk-prod__media { height: 100px; }
	.mgk-products .mgk-prod__body { padding: 10px; gap: 6px; }
	/* Cert chips are green-on-mint pills here (the mockup's own treatment),
	   overriding the per-cert colour scheme used on desktop. */
	.mgk-products .mgk-prod__badges { gap: 4px; min-height: 0; }
	.mgk-products .mgk-prod__badges .mgk-chip {
		font-size: 10.5px; font-weight: 700; color: #067647; background: #ECFDF3;
		border-radius: 10px; padding: 2px 7px; border: 0;
	}
	.mgk-products .mgk-prod__name {
		font-size: 13.5px; font-weight: 600; color: var(--fm-ink);
		line-height: 1.3; min-height: 35px;
	}
	.mgk-products .mgk-prod__foot { margin-top: auto; }
	.mgk-products .mgk-prod__price { font-size: 16px; font-weight: 700; color: var(--fm-ink); }
	.mgk-products .mgk-prod__price--sale { color: var(--fm-red); }
	.mgk-products .mgk-prod__unit { font-size: 10.5px; }
	.mgk-products .mgk-prod__was { font-size: 11px; margin-left: 6px; }
	.mgk-products .mgk-prod__add {
		width: 40px; height: 40px; border-radius: 20px; background: var(--fm-blue);
		font-size: 20px; font-weight: 600; line-height: 1;
	}
	.mgk-products .mgk-prod:hover .mgk-prod__add,
	.mgk-products .mgk-prod:hover .mgk-prod__add-wide { background: var(--fm-blue); }
	.mgk-products .mgk-prod:hover .mgk-prod__img { transform: none; }
	.mgk-products .mgk-prod__add:active { transform: scale(.94); }
	.mgk-products .mgk-prod__pct {
		top: 9px; left: 8px; border-radius: 7px; padding: 4px 7px;
		font-size: 10.5px; font-weight: 800; background: var(--fm-red);
	}
	.mgk-products .mgk-prod__tag {
		top: 9px; right: 8px; border-radius: 10px; padding: 4px 7px;
		font-size: 8px; font-weight: 700; letter-spacing: .5px; background: var(--fm-blue);
	}
	/* Out-of-stock cards get the mockup's full-width outlined wishlist button
	   in place of the inline price + icon row. */
	.mgk-products .mgk-prod__oos { background: rgba(255,255,255,.72); }
	.mgk-products .mgk-prod__oos .mgk-chip--red {
		background: #FEF3F2; color: #B42318; border: 1px solid #FECDCA;
		font-size: 12px; font-weight: 700; border-radius: 14px; padding: 5px 10px;
	}
	.mgk-products .mgk-prod__wish {
		width: 40px; height: 40px; border-radius: 20px; border-width: 1.5px;
		border-color: #D0D5DD; font-size: 16px;
	}
	.mgk-products .mgk-prod__wish-wide, .mgk-products .mgk-prod__add-wide {
		height: 42px; padding: 0; border-radius: 22px; font-size: 12.5px; font-weight: 700;
	}
	.mgk-products .mgk-prod__wish-wide {
		background: #FFFFFF; color: var(--fm-ink-2); border: 1.5px solid #D0D5DD;
	}
	.mgk-products .mgk-prod__add-wide { background: var(--fm-blue); }
}


/* ════════════════════════════════════════════════════════════════════════════
 * S-011 … S-024 — Delivery & Account flows (widgets 024–037)
 * ════════════════════════════════════════════════════════════════════════════ */

/* Shared — status pill (mirrors design-system StatusPill).
   Scoped to the --modifier variants below rather than the bare .mgk-pill:
   that base class is ALSO the dropdown wrapper used by the shop filter bar
   and the cart row's options popover (.mgk-pill, position:relative at the
   top of this file), and those never take a modifier. Unscoped, this rule's
   display:inline-flex + padding:3px 10px overrode that wrapper and pushed
   its absolutely-positioned panel 10px left of its own trigger. */
[class*="mgk-pill--"] { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.mgk-pill--pending    { background: var(--mgk-amber-bg); color: var(--mgk-amber); }
.mgk-pill--confirmed  { background: var(--mgk-sfa-bg);   color: var(--mgk-sfa); }
.mgk-pill--picking    { background: #EDE9FE;             color: #7C3AED; }
.mgk-pill--delivering { background: var(--mgk-teal-bg);  color: var(--mgk-teal); }
.mgk-pill--delivered  { background: var(--mgk-green-bg); color: var(--mgk-green); }
.mgk-pill--cancelled  { background: var(--mgk-red-bg);   color: var(--mgk-red); }
.mgk-pill--active     { background: var(--mgk-green-bg); color: var(--mgk-green); }
.mgk-pill--packed     { background: #EDE9FE;             color: #7C3AED; }
.mgk-pill--dispatched { background: var(--mgk-teal-bg);  color: var(--mgk-teal); }
/* Same bg/fg as the Merchant Orders status column (mgk_orders_status_style()
   in inc/mgk-merchant-orders.php, 'refunded'/'mgk-partial' entries) — kept
   identical on purpose so a refunded order reads the same colour everywhere
   a merchant sees it, not cancelled's red or pending's grey. */
.mgk-pill--refunded    { background: #FBF0FF; color: #8C34AB; }
.mgk-pill--mgk-partial { background: #FFF6F0; color: #B5541A; }

/* Shared selectable-button base used across several flows */
.mgk-dslot__date, .mgk-dslot__slot, .mgk-cc__time, .mgk-ohist__filter, .mgk-subm__freqsel-opt {
	font-family: inherit; cursor: pointer; border: 1px solid var(--mgk-border); background: var(--mgk-surface);
	color: var(--mgk-text); border-radius: var(--mgk-radius-sm); font-weight: 600; transition: all .15s;
}
.mgk-dslot__date:hover, .mgk-cc__time:hover, .mgk-ohist__filter:hover, .mgk-subm__freqsel-opt:hover { border-color: var(--mgk-teal); }

/* ── 024 Zone Checker ───────────────────────────────────────── */
.mgk-zonechk { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.mgk-zonechk__hero { position: relative; border-radius: var(--mgk-radius); overflow: hidden; background: linear-gradient(135deg, var(--mgk-navy) 40%, var(--mgk-navy-md) 100%); }
.mgk-zonechk__hero-body { padding: 36px 32px; color: #fff; }
.mgk-zonechk__heading { font-size: 22px; font-weight: 800; margin: 0 0 8px; color: #fff; }
.mgk-zonechk__sub { font-size: 14px; margin: 0; color: rgba(255,255,255,.72); }
.mgk-zonechk__form-card { text-align: center; }
.mgk-zonechk__form { display: flex; gap: 12px; max-width: 420px; margin: 0 auto; }
.mgk-zonechk__input { flex: 1; min-width: 0; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text); border-radius: var(--mgk-radius-sm); padding: 12px 16px; font-size: 14px; text-align: center; letter-spacing: .15em; }
.mgk-zonechk__input:focus { outline: none; border-color: var(--mgk-teal); }
.mgk-zonechk__zone { background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 12px; }
.mgk-zonechk__zone-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mgk-zonechk__zone-name { font-size: 14px; font-weight: 600; color: var(--mgk-text); margin: 0; }
.mgk-zonechk__zone-note { font-size: 12px; color: var(--mgk-text-2); margin: 0; }
.mgk-zonechk__zone-detail { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-zonechk__zone-methods { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
/* Shared JS writes the hero's result element classes verbatim (see
   mgk-retail.js mgk-zone-form handler); its neutral/loading state is white
   text for the dark hero banner, so override for this card's light background.
   The --ok/--error modifier states already set their own explicit colors. */
.mgk-zonechk__form-card .mgk-hero__zone-result { max-width: 420px; margin: 16px auto 0; background: var(--mgk-bg-alt); color: var(--mgk-text); }

/* ── 025 Delivery Slot ──────────────────────────────────────── */
.mgk-dslot { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.mgk-dslot__hero { position: relative; border-radius: var(--mgk-radius); overflow: hidden; background: var(--mgk-navy); }
.mgk-dslot__hero-body { padding: 28px 32px; color: #fff; }
.mgk-dslot__heading { font-size: 20px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.mgk-dslot__sub { font-size: 14px; margin: 0; color: rgba(255,255,255,.72); }
.mgk-dslot__dates { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mgk-dslot__date { padding: 12px 4px; font-size: 12px; border-width: 2px; }
.mgk-dslot__date.is-sel { background: var(--mgk-navy); color: #fff; border-color: var(--mgk-navy); }
.mgk-dslot__slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mgk-dslot__slot { padding: 10px 8px; font-size: 12px; text-align: center; }
.mgk-dslot__slot.is-full { background: var(--mgk-bg-alt); color: var(--mgk-text-3); cursor: not-allowed; }
.mgk-dslot__note { font-size: 12px; color: var(--mgk-text-3); margin: 12px 0 0; }
.mgk-dslot__confirm { background: var(--mgk-teal-bg); border: 1px solid rgba(0,153,179,.3); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mgk-dslot__confirm-sel { font-weight: 700; color: var(--mgk-navy); margin: 0; }
.mgk-dslot__confirm-eta { font-size: 14px; color: var(--mgk-text-2); margin: 2px 0 0; }

/* ── 026 Click & Collect ────────────────────────────────────── */
.mgk-cc { display: flex; flex-direction: column; gap: 20px; }
.mgk-cc__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-cc__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 24px; }
.mgk-cc__list { display: flex; flex-direction: column; gap: 12px; }
.mgk-cc__outlet { text-align: left; cursor: pointer; border: 2px solid var(--mgk-border); background: var(--mgk-surface); border-radius: var(--mgk-radius); overflow: hidden; padding: 0; transition: all .15s; }
.mgk-cc__outlet:hover { box-shadow: var(--mgk-shadow-lg); }
.mgk-cc__outlet.is-sel { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }
.mgk-cc__outlet-media { position: relative; display: block; height: 112px; background: var(--mgk-navy); }
body .mgk-cc__outlet-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-cc__outlet-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 36px; }
.mgk-cc__outlet-overlay { position: absolute; left: 12px; bottom: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mgk-cc__outlet-name { color: #fff; font-weight: 700; font-size: 14px; }
.mgk-cc__outlet-body { display: block; padding: 12px; }
.mgk-cc__outlet-addr { display: block; font-size: 12px; color: var(--mgk-text-3); margin-bottom: 8px; }
.mgk-cc__outlet-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-cc__detail { display: flex; flex-direction: column; gap: 16px; }
.mgk-cc__map { position: relative; border-radius: var(--mgk-radius); overflow: hidden; height: 192px; background: linear-gradient(135deg, var(--mgk-navy), var(--mgk-navy-md)); }
.mgk-cc__map-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.mgk-cc__map-pin { font-size: 44px; margin-bottom: 8px; }
.mgk-cc__map-title { font-weight: 700; font-size: 14px; margin: 0; }
.mgk-cc__map-sub { font-size: 12px; color: rgba(255,255,255,.6); margin: 2px 0 0; }
.mgk-cc__map-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.mgk-cc__map-badge { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.mgk-cc__map-badge:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.mgk-cc__times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mgk-cc__time { padding: 10px 8px; font-size: 12px; text-align: center; }
.mgk-cc__time.is-sel { background: var(--mgk-navy); color: #fff; border-color: var(--mgk-navy); }

/* ── 027 Quick Commerce ─────────────────────────────────────── */
.mgk-qc { display: flex; flex-direction: column; gap: 20px; max-width: 620px; }
.mgk-qc__hero { position: relative; border-radius: var(--mgk-radius); overflow: hidden; background: linear-gradient(135deg, var(--mgk-navy), var(--mgk-navy-md)); }
.mgk-qc__hero-body { padding: 32px; color: #fff; }
.mgk-qc__badge { margin-bottom: 10px; }
.mgk-qc__heading { font-size: 26px; font-weight: 900; margin: 0 0 6px; color: #fff; }
.mgk-qc__sub { font-size: 14px; margin: 0; color: rgba(255,255,255,.72); }
.mgk-qc__opts { display: flex; flex-direction: column; gap: 12px; }
.mgk-qc__opt { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; text-align: left; cursor: pointer; border: 2px solid var(--mgk-border); background: var(--mgk-surface); border-radius: var(--mgk-radius); padding: 20px; transition: all .15s; }
.mgk-qc__opt:hover { box-shadow: var(--mgk-shadow-lg); }
.mgk-qc__opt.is-sel { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }
.mgk-qc__opt-left { display: flex; gap: 12px; }
.mgk-qc__opt-icon { font-size: 30px; }
.mgk-qc__opt-body { display: flex; flex-direction: column; gap: 2px; }
.mgk-qc__opt-title { font-weight: 700; color: var(--mgk-text); }
.mgk-qc__opt-desc { font-size: 14px; color: var(--mgk-text-2); }
.mgk-qc__opt-note { font-size: 12px; color: var(--mgk-teal); font-family: monospace; }
.mgk-qc__opt-right { text-align: right; white-space: nowrap; }
.mgk-qc__opt-price { display: block; font-weight: 900; color: var(--mgk-green); }
.mgk-qc__opt-cap { font-size: 12px; color: var(--mgk-text-3); }

/* ── 028 Order Tracking ─────────────────────────────────────── */
/* ui-retail S-015 spec (track-order.svg): every text node in this screen is
   set in Quicksand, unlike the rest of the site which keeps --mgk-font
   (Inter, see mgk-font-quicksand enqueue comment in functions.php). Scoped
   to .mgk-track so surrounding chrome (header/nav) is unaffected. */
/* Comp container: 1016px content column, centred, on the #FAFAFA page wash.
   --mgk-track-blue is the comp's Blue Ribbon accent: reached timeline dots and
   rail, the item count, the footer action outlines. Declared locally rather than
   by retuning the global --mgk-blue (#1565C0), which 18 other rules across the
   site depend on. Also re-scoped onto the timeline block below, which sits
   outside .mgk-track in the stylesheet. */
.mgk-track { --mgk-track-blue: #1363FF; display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 1016px; margin-inline: auto; font-family: 'Quicksand', var(--mgk-font); }

/* Back link — its own row above the head. .mgk-back carries a global
   margin-bottom: 8px that would stack on top of the container's 20px gap (28px
   total, breaking the comp's rhythm), and as a flex child it would stretch the
   full 1016px and make the whole strip clickable — so zero the margin and shrink
   it to its text. Needs the .mgk-track prefix to outrank .mgk-back, which is a
   single class like .mgk-track__back but declared LATER in this file (§ shared
   back links) and would otherwise win on source order. */
.mgk-track .mgk-track__back { align-self: flex-start; margin-bottom: 0; }

/* Page head — title + order number on the left, status pill on the right.
   Baseline-aligned (comp: align-items: flex-end) so the pill sits on the order
   number's line rather than floating at the block's vertical centre. */
.mgk-track__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.mgk-track__head-main { min-width: 0; }
.mgk-track__heading { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--mgk-navy); margin: 0; }
.mgk-track__order { font-size: 14px; line-height: 20px; color: var(--mgk-text-3); margin: 0; }
/* Pill: neutral base, then a per-status palette. Violet = in-flight fulfilment
   (comp shows "Picking"), green = done, red = cancelled, slate = not started. */
.mgk-track__status { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; background: var(--mgk-bg-alt); color: var(--mgk-text-2); }
.mgk-track__status--picking,
.mgk-track__status--packed,
.mgk-track__status--dispatched { background: #EDE9FE; color: #7C3AED; }
.mgk-track__status--delivered { background: var(--mgk-green-bg); color: var(--mgk-green); }
.mgk-track__status--cancelled { background: #FEE9E9; color: #C62828; }

/* Two-column row (comp): 585px Fulfillment Progress | 408px Order summary,
   24px gutter. The progress card is a direct grid child; the right side is a
   stack (.mgk-track__col--aside) so the footer actions sit under the summary. */
.mgk-track__cols { display: grid; grid-template-columns: minmax(0, 585fr) minmax(0, 408fr); gap: 24px; align-items: stretch; }
.mgk-track__col { display: flex; flex-direction: column; gap: 24px; min-width: 0; min-height: 0; }
.mgk-track__cols .mgk-card { border-radius: 16px; padding: 20px; }
/* Aside column stretches to the progress card's height (align-items: stretch
   above); items-card fills it (flex + min-height: 0 lets it shrink below its
   content's natural size) so a long item list scrolls internally instead of
   pushing this card — and the whole right-hand side — taller than the left. */
.mgk-track__items-card { padding: 22px; gap: 13px; display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }

/* Order summary card head — "Order" + the blue unit count, baseline-aligned. */
.mgk-track__sum-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mgk-track__sum-title { font-size: 17px; line-height: 21px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; }
.mgk-track__sum-count { font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--mgk-track-blue); }

/* Items rows (comp): 60px thumb, name left, x{qty} over the line total right.
   No separators between rows — the comp separates only items from the footer. */
/* The scrollable region: header (sum-head) and footer (sum-sep/sum-foot)
   keep their natural size via flex-shrink: 0 below, so only the row list
   itself scrolls when it's taller than the space the progress card allows. */
.mgk-track__items { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.mgk-track__sum-head,
.mgk-track__sum-sep,
.mgk-track__sum-foot { flex-shrink: 0; }
/* Rows are top-aligned, not centred: a wrapped two-line product name (long
   names carry their variant, e.g. "… — Weight: ~500g") would otherwise push the
   x{qty}/price stack to the row's vertical middle and break the comp's
   thumbnail-to-price baseline. min-height keeps a single-line row at the comp's
   68px even when the OOS state hides the price. */
.mgk-track__item { display: flex; align-items: flex-start; gap: 14px; padding: 4px 0; min-height: 68px; }
.mgk-track__item-img { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #F4F6F9; flex-shrink: 0; }
/* `contain`, not `cover`: the WooCommerce placeholder is a bordered "no image"
   graphic, and cropping it to fill a 36px square cuts that border off. Real
   product photos are square anyway, so contain matches cover for them. */
body .mgk-track__item-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.mgk-track__item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mgk-track__item-name { display: block; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--mgk-navy-900); margin: 0; }
.mgk-track__item-note { display: block; font-size: 12px; line-height: 16px; color: var(--mgk-amber); margin: 0; }
.mgk-track__item-note--oos { display: none; color: var(--mgk-red); font-weight: 600; }
.mgk-track__item-note--sale { color: var(--mgk-red); font-weight: 600; }
/* Right column of a row: unit count above the extended price, its first line
   sharing the product name's baseline (comp's 52×40 stack). */
.mgk-track__item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.mgk-track__item-qty { font-size: 14px; line-height: 20px; font-weight: 500; color: #A1A1A1; }
.mgk-track__item-price { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--mgk-navy-900); white-space: nowrap; }
.mgk-track__item-review { display: none; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--mgk-track-blue); text-decoration: none; white-space: nowrap; }
.mgk-track__item-review:hover { text-decoration: underline; }
.mgk-track__item.has-mgk-item-oos .mgk-track__item-note--oos { display: block; }
.mgk-track__item.has-mgk-item-oos .mgk-track__item-review { display: inline-block; }
.mgk-track__item.has-mgk-item-oos .mgk-track__item-price { display: none; }

/* Summary footer — hairline rule, then Payment/Total labels against their
   right-aligned values (comp: label column left, value column right). */
.mgk-track__sum-sep { height: 1px; background: #EFF2F6; }
.mgk-track__sum-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 12px 0; }
.mgk-track__sum-labels,
.mgk-track__sum-values { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mgk-track__sum-values { align-items: flex-end; text-align: right; }
.mgk-track__sum-paylabel { font-size: 12px; line-height: 16px; color: #A1A1A1; }
.mgk-track__sum-payval { font-size: 12px; line-height: 16px; font-weight: 500; color: #0A0A0A; }
.mgk-track__sum-totlabel { font-size: 15.5px; line-height: 19px; font-weight: 700; color: var(--mgk-navy-900); }
.mgk-track__sum-totval { font-size: 17px; line-height: 21px; font-weight: 700; color: var(--mgk-navy-900); }

/* Estimate footnote closing the progress card — the timeline's times are
   projections, so the card says so rather than implying a booked window. */
.mgk-track__estimate { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--mgk-text-3); margin: 0; }

/* Footer actions (comp) — three equal outlined blue buttons filling one row
   under the summary card. They share the width rather than sitting at a fixed
   124px: "Send Feedback" alone needs ~143px at this weight, so a fixed width
   would wrap the third button onto its own line inside the 408px column. */
.mgk-track__actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.mgk-track__act { flex: 1 1 0; min-width: 0; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px; border: 1px solid var(--mgk-track-blue); border-radius: 8px; background: transparent; color: var(--mgk-track-blue); font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.mgk-track__act:hover { background: rgba(19,99,255,.06); color: var(--mgk-track-blue); }

@media (max-width: 980px) {
	.mgk-track__cols { grid-template-columns: 1fr; }
	.mgk-track__actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
	/* Below ~480px three buttons on one line squeeze each to ~130px and clip
	   their labels — stack them full-width instead. */
	.mgk-track__actions { flex-wrap: wrap; }
	.mgk-track__act { flex: 1 1 100%; }
}

/* ── 029 Substitution Approval ──────────────────────────────── */
.mgk-subs { display: flex; flex-direction: column; gap: 20px; max-width: 620px; }
.mgk-subs__alert { background: var(--mgk-amber-bg); border: 1px solid rgba(240,152,48,.4); text-align: center; }
.mgk-subs__alert-icon { font-size: 32px; margin-bottom: 12px; }
.mgk-subs__heading { font-size: 20px; font-weight: 700; color: #92400E; margin: 0 0 4px; }
.mgk-subs__sub { font-size: 14px; color: #92400E; margin: 0 0 12px; }
.mgk-subs__timer { display: inline-flex; align-items: center; gap: 8px; background: #FDE68A; color: #92400E; padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.mgk-subs__col { text-align: left; }
.mgk-subs__col--sub { border: 1.5px solid rgba(34,168,107,.6); background: var(--mgk-green-bg); }
.mgk-subs__col-title { font-size: 10px; font-weight: 700; text-transform: uppercase; margin: 0 0 12px; color: var(--mgk-text-3); }
.mgk-subs__col-title--sub { color: var(--mgk-green); }
.mgk-subs__media { height: 128px; border-radius: var(--mgk-radius-sm); overflow: hidden; border: 1px solid var(--mgk-border); display: flex; align-items: center; justify-content: center; font-size: 40px; background: var(--mgk-bg-alt); margin-bottom: 8px; }
body .mgk-subs__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-subs__media--orig img { filter: grayscale(1); opacity: .6; }
.mgk-subs__name { font-size: 14px; font-weight: 600; color: var(--mgk-text); margin: 0 0 4px; }
.mgk-subs__meta { font-size: 12px; color: var(--mgk-text-3); margin: 0 0 4px; }
.mgk-subs__price { font-weight: 700; color: var(--mgk-navy); margin: 0 0 6px; }
.mgk-subs__price--sub { color: var(--mgk-green); }
.mgk-subs__msg-title { font-size: 14px; font-weight: 600; color: var(--mgk-text); margin: 0 0 8px; }
.mgk-subs__msg { background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 12px; font-size: 14px; color: var(--mgk-text-2); }
.mgk-subs__actions { gap: 16px; }
.mgk-subs__whatsapp { width: 100%; }
/* hidden must beat .mgk-grid { display:grid } — same precedent as
   .mgk-gst__row[hidden] above. */
[data-mgk-sub-actions][hidden] { display: none !important; }
.mgk-subs.is-decided .mgk-subs__alert { background: var(--mgk-green-bg); border-color: rgba(34,168,107,.4); }
.mgk-subs.is-decided .mgk-subs__heading,
.mgk-subs.is-decided .mgk-subs__sub { color: var(--mgk-green); }
/* Once a decision is recorded, the col that's no longer the real order item
   (rejected substitute, or the OOS original after an approved swap) fades —
   the other card is what's actually in the order now. */
.mgk-subs__col--out { opacity: .55; }
.mgk-subs__col--out .mgk-subs__media--orig img { filter: grayscale(1); opacity: .4; }

/* Fulfilment Change Confirmation (S-046) — same shell as .mgk-subs above,
   just without the two-column compare grid (there's no substitute product
   here, only the fulfilment method itself). */
.mgk-fulchg { display: flex; flex-direction: column; gap: 20px; max-width: 620px; min-height: calc(100vh - 64px); }
.mgk-fulchg__alert { background: var(--mgk-amber-bg); border: 1px solid rgba(240,152,48,.4); text-align: center; }
.mgk-fulchg__alert-icon { font-size: 32px; margin-bottom: 12px; }
.mgk-fulchg__heading { font-size: 20px; font-weight: 700; color: #92400E; margin: 0 0 4px; }
.mgk-fulchg__sub { font-size: 14px; color: #92400E; margin: 0 0 12px; }
.mgk-fulchg__timer { display: inline-flex; align-items: center; gap: 8px; background: #FDE68A; color: #92400E; padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.mgk-fulchg__actions { gap: 16px; }
[data-mgk-fulchg-actions][hidden] { display: none !important; }
.mgk-fulchg.is-decided .mgk-fulchg__alert { background: var(--mgk-green-bg); border-color: rgba(34,168,107,.4); }
.mgk-fulchg.is-decided .mgk-fulchg__heading,
.mgk-fulchg.is-decided .mgk-fulchg__sub { color: var(--mgk-green); }

/* Reorder page (030) and its .mgk-ordercard/.mgk-reorder__* styling removed
   — retired as a standalone page; Order History's own card + Reorder button
   (.mgk-ohist__*) covers this now. */

/* ── 031 Wishlist (ui-retail S-017) ─────────────────────────── */
.mgk-wish { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 8px 0 40px; }
.mgk-wish__head { width: 100%; max-width: 806px; }
.mgk-wish__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-wish__list { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 806px; }
.mgk-wish__list[hidden] { display: none; }
.mgk-wish__item { display: flex; align-items: flex-start; gap: 16px; padding: 20px; border-radius: var(--mgk-radius-sm); box-shadow: none; }
.mgk-wish__media { width: 96px; height: 96px; border: 1px solid var(--mgk-border); border-radius: 14px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--mgk-bg-alt); }
body .mgk-wish__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-wish__ph { font-size: 32px; }
.mgk-wish__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mgk-wish__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mgk-wish__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mgk-wish__name { font-size: 14px; font-weight: 600; color: var(--mgk-text); text-decoration: none; }
.mgk-wish__name:hover { text-decoration: underline; }
.mgk-wish__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mgk-wish__price { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.mgk-wish__price-now { font-size: 16px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-wish__price-each { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-wish__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.mgk-wish__actions { display: flex; align-items: center; gap: 12px; }
.mgk-wish__add { display: inline-flex; align-items: center; gap: 6px; background: var(--mgk-wish-add); color: #fff; border: none; border-radius: 6px; padding: 4px 12px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; transition: opacity .15s; }
.mgk-wish__add:hover { opacity: .9; }
.mgk-wish__add:disabled { opacity: .6; cursor: default; }
.mgk-wish__remove { background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; color: var(--mgk-wish-remove); }
.mgk-wish__remove:hover { opacity: .75; }
.mgk-wish__empty { width: 100%; max-width: 806px; text-align: center; padding: 48px 24px; }
.mgk-wish__empty-icon { font-size: 32px; margin-bottom: 12px; }
.mgk-wish__empty-title { font-weight: 600; color: var(--mgk-text); margin: 0 0 4px; }
.mgk-wish__empty-text { font-size: 14px; color: var(--mgk-text-2); margin: 0 auto; max-width: 52ch; line-height: 1.6; }
@media (max-width: 640px) {
	.mgk-wish__item { flex-wrap: wrap; }
	.mgk-wish__top { flex-wrap: wrap; }
	.mgk-wish__controls { flex-wrap: wrap; }
}

/* Cart's Wishlist tab reuses the standalone Wishlist page's markup/classes
   (see cart.php's data-mgk-cart-panel="wishlist"), but that page is a narrow
   centred column (806px cap above) while the Cart tab sits in the full-width
   .mgk-cart__grid layout — capping it there left the wishlist cards visibly
   narrower than the cart's own item rows. Drop the cap only in this context. */
[data-mgk-cart-panel="wishlist"] .mgk-wish__list,
[data-mgk-cart-panel="wishlist"] .mgk-wish__empty { max-width: none; }

/* ── 032 Loyalty Wallet ─────────────────────────────────────── */
.mgk-loyalty { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.mgk-loyalty__hero { background: linear-gradient(135deg, var(--mgk-navy), var(--mgk-navy-md)); border: none; text-align: center; color: #fff; }
.mgk-loyalty__coin { font-size: 48px; }
.mgk-loyalty__balance-label { font-size: 14px; color: rgba(255,255,255,.6); margin: 12px 0 0; }
.mgk-loyalty__balance { font-size: 44px; font-weight: 900; line-height: 1.1; }
.mgk-loyalty__balance-val { color: var(--mgk-teal-lt); margin: 0; }
.mgk-loyalty__hero-chips { display: flex; justify-content: center; gap: 12px; margin: 12px 0; }
.mgk-loyalty__note { font-size: 12px; color: rgba(255,255,255,.5); margin: 0; }
.mgk-loyalty__bar { background: var(--mgk-border); height: 12px; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.mgk-loyalty__bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mgk-amber), #FCD34D); }
.mgk-loyalty__tier { background: var(--mgk-bg-alt); border: 2px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 12px; text-align: center; }
.mgk-loyalty__tier.is-active { background: var(--mgk-amber-bg); border-color: var(--mgk-amber); }
.mgk-loyalty__tier-name { font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-loyalty__tier-perk { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-loyalty__earn, .mgk-loyalty__redeem { display: flex; flex-direction: column; gap: 8px; }
.mgk-loyalty__earn-row, .mgk-loyalty__redeem-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--mgk-text-2); }
.mgk-loyalty__redeem-label { font-size: 14px; color: var(--mgk-text-2); }
.mgk-loyalty__txs { display: flex; flex-direction: column; }
.mgk-loyalty__tx { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--mgk-border-lt); }
.mgk-loyalty__tx-desc { font-size: 14px; font-weight: 500; color: var(--mgk-text); margin: 0; }
.mgk-loyalty__tx-date { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
.mgk-loyalty__tx-amount { font-size: 14px; font-weight: 700; }
.mgk-loyalty__tx-amount--pos { color: var(--mgk-green); }
.mgk-loyalty__tx-amount--neg { color: var(--mgk-red); }

/* ── 033 Account Dashboard (S-020, dashboad.svg) ───────────────────────── */
.mgk-acct { display: flex; flex-direction: column; gap: 20px; }

.mgk-acct__profile { display: flex; align-items: center; gap: 20px; background: #FFFFFF; border: 1px solid #165DFF; padding: 31px 24px; }
.mgk-acct__avatar { width: 64px; height: 64px; border-radius: var(--mgk-radius-sm); background: #1363FF; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: #fff; flex-shrink: 0; }
body .mgk-acct__avatar--photo { object-fit: cover; object-position: center; }
.mgk-acct__profile-body { flex: 1; }
.mgk-acct__profile-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.mgk-acct__name { font-size: 20px; font-weight: 700; margin: 0; color: var(--mgk-navy-900, #061937); }
.mgk-acct__contact { font-size: 14px; font-weight: 600; color: var(--mgk-navy-900, #061937); margin: 0; }
.mgk-acct__edit { display: inline-flex; align-items: center; justify-content: center; padding: 5px 16px; background: #1363FF; color: #fff; font-size: 14px; font-weight: 400; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.mgk-acct__edit:hover { opacity: .92; }

.mgk-acct__top { display: flex; align-items: stretch; gap: 24px; }
.mgk-acct__stats { display: flex; gap: 24px; flex: 0 0 auto; width: 678px; }
.mgk-acct__stat { flex: 1; padding: 20px; border-radius: var(--mgk-radius); box-shadow: var(--mgk-shadow); }
.mgk-acct__stat--blue { background: #E3F0FF; border: 1px solid rgba(21,101,192,.133); }
.mgk-acct__stat--green { background: var(--mgk-green-bg); border: 1px solid rgba(34,168,107,.133); }
.mgk-acct__stat-val { font-size: 24px; font-weight: 700; line-height: 32px; color: var(--mgk-text); }
.mgk-acct__stat--blue .mgk-acct__stat-val { color: var(--mgk-blue); }
.mgk-acct__stat--green .mgk-acct__stat-val { color: var(--mgk-green); }
.mgk-acct__stat-label { font-size: 14px; color: var(--mgk-text-2); margin: 8px 0 0; }

.mgk-acct__quick { flex: 1; padding: 20px; }
.mgk-acct__quick-title { font-size: 14px; font-weight: 700; color: var(--mgk-navy-900, #061937); margin: 0 0 16px; }
.mgk-acct__quick-list { display: flex; gap: 8px; }
.mgk-acct__quick-item { flex: 1; display: flex; align-items: center; gap: 4px; padding: 12px; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); text-decoration: none; color: inherit; transition: box-shadow .15s; }
.mgk-acct__quick-item:hover { box-shadow: var(--mgk-shadow-lg); }
.mgk-acct__quick-icon { font-size: 16px; line-height: 1; }
.mgk-acct__quick-label { flex: 1; font-size: 12px; color: #1E3545; }
.mgk-acct__quick-arrow { color: var(--mgk-text-3); font-size: 16px; }

.mgk-acct__mid { display: flex; align-items: stretch; gap: 24px; }
.mgk-acct__ohist, .mgk-acct__active { flex: 1; padding: 20px; }
.mgk-acct .mgk-sh { align-items: center; margin-bottom: 0; }
.mgk-acct__viewall, .mgk-acct__track { display: inline-flex; align-items: center; justify-content: center; padding: 3px 16px; background: #F2F3F5; color: #165DFF; font-size: 14px; font-weight: 400; border-radius: 6px; text-decoration: none; white-space: nowrap; }
.mgk-acct__viewall:hover, .mgk-acct__track:hover { opacity: .85; }

.mgk-acct__orders { display: flex; flex-direction: column; margin-top: 16px; }
.mgk-acct__order { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #E8EFF7; text-decoration: none; color: inherit; }
.mgk-acct__orders .mgk-acct__order:last-child { border-bottom: none; }
.mgk-acct__order-left { display: flex; align-items: center; gap: 10px; }
.mgk-acct__order-thumb { width: 32px; height: 32px; border-radius: 10px; background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.mgk-acct__order-thumbs { display: flex; flex-shrink: 0; }
body .mgk-acct__order-thumb-img { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; object-position: center; border: 1px solid var(--mgk-border); background: var(--mgk-bg-alt); }
.mgk-acct__order-thumb-img + .mgk-acct__order-thumb-img { margin-left: -12px; }
.mgk-acct__order-id { font-weight: 600; font-size: 14px; color: #1B3A52; margin: 0; }
.mgk-acct__order-meta { font-size: 12px; color: var(--mgk-text-3); margin: 0; }

.mgk-acct__order--active { border-bottom: 1px solid #E8EFF7; margin-top: 16px; }
.mgk-acct__steps { display: flex; align-items: flex-start; padding-top: 16px; }
.mgk-acct__step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; }
.mgk-acct__step-rail { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.mgk-acct__step-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #FFFFFF; border: 2px solid var(--mgk-border); font-size: 12px; font-weight: 700; color: var(--mgk-text-3); }
.mgk-acct__step-bar { position: absolute; top: 50%; left: 50%; width: 100%; height: 2px; background: var(--mgk-border); transform: translateY(-50%); }
.mgk-acct__step-bar.is-done { background: var(--mgk-green); }
.mgk-acct__step--done .mgk-acct__step-dot { background: var(--mgk-green); border-color: var(--mgk-green); color: #fff; }
.mgk-acct__step--current .mgk-acct__step-dot { background: var(--mgk-navy-900, #061937); border-color: var(--mgk-navy-900, #061937); color: #fff; }
.mgk-acct__step-label { font-size: 13px; font-weight: 600; color: var(--mgk-text-3); margin: 0; }
.mgk-acct__step--done .mgk-acct__step-label, .mgk-acct__step--current .mgk-acct__step-label { color: var(--mgk-navy-900, #061937); }
.mgk-acct__step-time { font-size: 11px; color: var(--mgk-text-3); margin: 2px 0 0; }

.mgk-acct__recent { padding: 20px; }
.mgk-acct__prods { display: flex; gap: 24px; margin-top: 16px; flex-wrap: wrap; }
.mgk-acct__prod { flex: 1; min-width: 180px; max-width: 209px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.mgk-acct__prod-media { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; background: #FAFAFA; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); overflow: hidden; }
.mgk-acct__prod-media img { width: 100%; height: 100%; object-fit: contain; }
.mgk-acct__prod-ph { font-size: 40px; }
.mgk-acct__prod-name { font-size: 14px; font-weight: 600; color: #1B3A52; margin: 0; }
.mgk-acct__prod-sku { font-size: 12px; font-weight: 500; color: var(--mgk-text-3); margin: 0; }
.mgk-acct__prod-badges { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── 034 Order History ──────────────────────────────────────── */
.mgk-ohist { display: flex; flex-direction: column; gap: 20px; }
.mgk-ohist__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mgk-ohist__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-ohist__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-ohist__filter { padding: 6px 16px; font-size: 12px; }
.mgk-ohist__filter.is-sel { background: #1363FF; color: #fff; border-color: #1363FF; }
.mgk-ohist__empty { text-align: center; color: #6b7280; font-size: 14px; padding: 28px 0; }
.mgk-ohist__list { display: flex; flex-direction: column; gap: 12px; }
.mgk-ohist__order { display: flex; flex-direction: column; }
.mgk-ohist__order[hidden] { display: none; }
.mgk-ohist__order-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mgk-ohist__order-left { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0; }
.mgk-ohist__thumbs { display: flex; gap: 4px; flex-shrink: 0; }
.mgk-ohist__thumb { width: 48px; height: 48px; border-radius: var(--mgk-radius-sm); overflow: hidden; border: 1px solid var(--mgk-border); display: flex; align-items: center; justify-content: center; background: var(--mgk-bg-alt); font-size: 20px; flex-shrink: 0; }
body .mgk-ohist__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-ohist__order-id-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mgk-ohist__order-id { font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-ohist__order-type.mgk-chip { padding: 6px 14px; }
.mgk-ohist__order-meta { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
.mgk-ohist__order-total { font-size: 14px; font-weight: 600; color: var(--mgk-text-2); margin: 0; }
.mgk-ohist__order-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; width: 85px; }
.mgk-ohist__order-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mgk-ohist__reorder { display: flex; flex-direction: row; justify-content: center; align-items: center; padding: 5px 16px; gap: 8px; width: 85px; height: 32px; background: #1363FF; border: none; border-radius: 8px; font-family: 'Quicksand', var(--mgk-font); font-style: normal; font-weight: 400; font-size: 14px; line-height: 22px; color: #FFFFFF; text-decoration: none; cursor: pointer; }
.mgk-ohist__reorder:hover { opacity: .9; }

/* Mobile-only (≤640px) card detail — first item + badges + View more +
   Total/Reorder footer (odhtr.svg mockup's mobile card). Hidden on desktop;
   the desktop .mgk-ohist__order-right keeps its own Reorder button there. */
.mgk-ohist__mobile-detail { display: none; }
.mgk-ohist__mobile-item { display: flex; align-items: flex-start; gap: 12px; }
.mgk-ohist__mobile-thumb { width: 48px; height: 48px; border-radius: var(--mgk-radius-sm); overflow: hidden; border: 1px solid var(--mgk-border); display: flex; align-items: center; justify-content: center; background: var(--mgk-bg-alt); font-size: 20px; flex-shrink: 0; }
.mgk-ohist__mobile-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-ohist__mobile-item-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mgk-ohist__mobile-item-name { font-size: 16px; font-weight: 700; color: var(--mgk-navy); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgk-ohist__mobile-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mgk-ohist__mobile-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; background: none; border: none; padding: 8px 0; font-size: 13px; color: var(--mgk-text-3); cursor: pointer; }
.mgk-ohist__mobile-more svg { transition: transform .15s; }
.mgk-ohist__mobile-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.mgk-ohist__mobile-more-panel { display: flex; flex-direction: column; gap: 12px; }
.mgk-ohist__mobile-more-panel[hidden] { display: none; }
.mgk-ohist__mobile-foot { display: flex; align-items: center; justify-content: space-between; }
.mgk-ohist__mobile-total { font-size: 14px; color: var(--mgk-text); margin: 0; }
.mgk-ohist__mobile-total strong { font-weight: 700; }

@media (max-width: 640px) {
	.mgk-ohist__order { gap: 12px; }
	/* Grid, not flex: the mockup puts the status pill on the SAME row as the
	   date/items/total meta line, while the order-id and type chip sit on
	   their own rows above it — a shape flex's single axis can't express, so
	   id/chip/meta/pill become named grid areas instead. No thumbnail column
	   here — the mockup's mobile card drops the order-level thumbnails
	   entirely; product images only appear per-item in .mgk-ohist__mobile-detail below. */
	.mgk-ohist__order-top { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; row-gap: 2px; align-items: start; }
	.mgk-ohist__order-left { display: contents; }
	.mgk-ohist__thumbs { display: none; }
	.mgk-ohist__order-info { display: contents; }
	.mgk-ohist__order-id-wrap { display: contents; }
	.mgk-ohist__order-id { grid-column: 1; grid-row: 1; }
	.mgk-ohist__order-type { grid-column: 1; grid-row: 2; justify-self: start; }
	.mgk-ohist__order-meta { grid-column: 1; grid-row: 2; }
	.mgk-ohist__order-right { display: contents; }
	/* Pill rides the order-id row, as in the mockup (line 3135: id and status
	   chip are the two children of one space-between flex row) — not the meta
	   row. Anchoring it to the meta row left an empty band the height of the
	   hidden type chip and dropped the pill out of line with the id. */
	.mgk-ohist__order-pill { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
	/* Reorder moves down next to Total; the grid only carries the status pill. */
	.mgk-ohist__order-right .mgk-ohist__reorder { display: none; }
	.mgk-ohist__mobile-detail { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
	.mgk-ohist__mobile-foot .mgk-ohist__reorder { display: flex; }
}

/* ── 035 Address Book ───────────────────────────────────────── */
.mgk-addr { display: flex; flex-direction: column; gap: 20px; }
.mgk-addr__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mgk-addr__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-addr__form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.mgk-addr__form[hidden] { display: none; }
.mgk-addr__form-actions { display: flex; gap: 8px; }
.mgk-addr__add { padding: 8px 16px; font-size: 14px; font-weight: 700; background: #1363FF; color: #fff; border: 1.5px solid #1363FF; }
.mgk-addr__empty { font-size: 14px; color: var(--mgk-text-2); }
.mgk-addr__empty[hidden] { display: none; }
.mgk-addr__list { display: flex; flex-direction: column; gap: 12px; }
[data-mgk-paymethod-list].mgk-addr__list { gap: 20px; }
.mgk-addr__item { border: 1px solid var(--mgk-border); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.mgk-addr__item.is-default { border-color: var(--mgk-border); }
.mgk-addr__item-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mgk-addr__item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mgk-addr__name { font-size: 14px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; }
.mgk-addr__sep { color: var(--mgk-border); font-weight: 400; }
.mgk-addr__phone { font-size: 14px; font-weight: 700; color: var(--mgk-navy-900); }
.mgk-addr__postal { font-size: 14px; color: var(--mgk-text-2); margin: 0; }
/* Both belong to the PHONE card (§ 305), which titles itself with the address
   label and puts "recipient · phone" on its own line. Desktop's head is
   name | phone, so these two would duplicate it there. */
.mgk-addr__label { display: none; }
.mgk-addr__who { display: none; }
.mgk-addr__postal span { font-weight: 700; color: var(--mgk-navy-900); margin-right: 6px; }
.mgk-addr__addr { font-size: 14px; color: var(--mgk-text-2); margin: 0; }
.mgk-addr__item-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mgk-addr__iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: none; background: transparent; color: #8A9FB5; cursor: pointer; }
.mgk-addr__iconbtn:hover { color: var(--mgk-navy-900); }
.mgk-addr__iconbtn--delete { color: #8A9FB5; }
.mgk-addr__iconbtn--delete:hover { color: var(--mgk-red); }

/* ── Payment Method (saved cards) ────────────────────────────── */
.mgk-paymethod__item { align-items: center; justify-content: flex-start; border-color: #C9CDD4; border-radius: 16px; padding: 24px; gap: 20px; }
.mgk-paymethod__item .mgk-addr__item-body { flex: 0 1 auto; }
.mgk-paymethod__item .mgk-addr__item-actions { margin-left: auto; }
.mgk-paymethod__brand { flex: 0 0 auto; width: 40px; height: 21px; border-radius: 2px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--mgk-navy-900); background-size: cover; background-position: center; }
.mgk-paymethod__brand img, .mgk-paymethod__brand svg { width: 100%; height: 100%; display: block; }
.mgk-paymethod__brand[data-brand="visa"] { background: #fff; }
.mgk-paymethod__brand[data-brand="amex"] { background: #016FD0; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.mgk-paymethod__mask { font-size: 16px; font-weight: 700; color: #1B3A52; letter-spacing: 1px; }
.mgk-paymethod__tag { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 4px; background: #FFECE8; color: #F53F3F; font-size: 14px; font-weight: 500; line-height: 1.57; }
.mgk-paymethod__defcheck { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: #061937; cursor: pointer; margin-top: 4px; }
.mgk-paymethod__defcheck input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 1px solid #DCE5EA; background: #fff; cursor: pointer; flex: 0 0 auto; position: relative; }
.mgk-paymethod__defcheck input:checked { border-color: #1363FF; }
.mgk-paymethod__defcheck input:checked::after { content: ''; position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; border-radius: 50%; background: #1363FF; }
.mgk-paymethod__notice { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; padding: 12px; border-radius: 8px; background: #E8F3FF; color: #1363FF; font-size: 16px; font-weight: 600; }
.mgk-paymethod__notice-icon { flex: 0 0 auto; display: inline-flex; }

/* ── 036 Subscription Management ────────────────────────────── */
.mgk-subm { display: flex; flex-direction: column; gap: 20px; }
.mgk-subm__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-subm__list { display: flex; flex-direction: column; gap: 16px; }
.mgk-subm__item { display: flex; flex-direction: column; gap: 16px; }
.mgk-subm__item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mgk-subm__item-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mgk-subm__icon { font-size: 20px; }
.mgk-subm__name { font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-subm__freq { font-size: 14px; color: var(--mgk-text-3); margin: 0; }
.mgk-subm__total-wrap { text-align: right; }
.mgk-subm__total { font-size: 18px; font-weight: 900; color: var(--mgk-navy); margin: 0; }
.mgk-subm__total-cap { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
.mgk-subm__next { background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mgk-subm__next-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--mgk-text-3); margin: 0 0 2px; }
.mgk-subm__next-date { font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-subm__next-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-subm__freqsel-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--mgk-text-3); margin: 0 0 8px; }
.mgk-subm__freqsel-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-subm__freqsel-opt { padding: 6px 12px; font-size: 12px; }
.mgk-subm__freqsel-opt.is-sel { background: var(--mgk-navy); color: #fff; border-color: var(--mgk-navy); }
.mgk-subm__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-subm__pause { color: var(--mgk-amber); }
.mgk-subm__cancel { color: var(--mgk-red); }

/* ── 037 Language Switch ────────────────────────────────────── */
.mgk-lang { display: flex; flex-direction: column; gap: 20px; max-width: 620px; }
.mgk-lang__picker { text-align: center; }
.mgk-lang__globe { font-size: 48px; margin-bottom: 16px; }
.mgk-lang__heading { font-size: 22px; font-weight: 700; color: var(--mgk-text); margin: 0 0 8px; }
.mgk-lang__sub { font-size: 14px; color: var(--mgk-text-2); margin: 0 auto 24px; max-width: 56ch; line-height: 1.6; }
.mgk-lang__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 380px; margin: 0 auto; }
.mgk-lang__opt { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; border: 2px solid var(--mgk-border); background: var(--mgk-surface); border-radius: var(--mgk-radius); padding: 16px; transition: all .15s; }
.mgk-lang__opt:hover { box-shadow: var(--mgk-shadow-lg); }
.mgk-lang__opt.is-sel { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }
.mgk-lang__flag { font-size: 30px; margin-bottom: 4px; }
.mgk-lang__name { font-weight: 700; font-size: 14px; color: var(--mgk-text); }
.mgk-lang__native { font-size: 12px; color: var(--mgk-text-3); }
.mgk-lang__sel-chip { margin-top: 8px; }
.mgk-lang__opt:not(.is-sel) .mgk-lang__sel-chip { display: none; }
.mgk-lang__preview { background: var(--mgk-bg-alt); }
.mgk-lang__preview-label { font-weight: 600; font-size: 14px; color: var(--mgk-text); margin: 0 0 8px; }
.mgk-lang__preview-box { background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 16px; }
.mgk-lang__preview-sample { font-weight: 600; font-size: 14px; color: var(--mgk-text); margin: 0 0 4px; }
.mgk-lang__preview-cta { font-size: 14px; color: var(--mgk-text-2); margin: 0; }
.mgk-lang__preview-note { font-size: 12px; color: var(--mgk-text-3); margin: 8px 0 0; }

/* ── Shared: navy chip (used by PDPA "Required", review "Selected") ───────── */
.mgk-chip--navy { background: var(--mgk-navy); color: #fff; border: 1px solid var(--mgk-navy); }

/* ── 038 Trust & Compliance (S-025) ─────────────────────────── */
.mgk-trustc { display: flex; flex-direction: column; gap: 16px; max-width: 920px; }
.mgk-trustc__hero { background: var(--mgk-navy); color: #fff; border-radius: var(--mgk-radius); padding: 36px 32px; }
.mgk-trustc__heading { font-size: 26px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.mgk-trustc__sub { font-size: 14px; margin: 0; color: rgba(255,255,255,.7); }
.mgk-trustc__badges { border-radius: var(--mgk-radius); }
.mgk-trustc__certs { display: flex; flex-direction: column; gap: 16px; }
.mgk-trustc__cert { display: flex; gap: 16px; }
.mgk-trustc__cert--halal   { background: var(--mgk-halal-bg);   border: 1.5px solid rgba(34,168,107,.25); }
.mgk-trustc__cert--sfa     { background: var(--mgk-sfa-bg);     border: 1.5px solid rgba(21,101,192,.25); }
.mgk-trustc__cert--organic { background: var(--mgk-organic-bg); border: 1.5px solid rgba(240,152,48,.25); }
.mgk-trustc__cert-icon { width: 64px; height: 64px; border-radius: var(--mgk-radius); background: var(--mgk-bg-alt); display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; }
.mgk-trustc__cert--halal   .mgk-trustc__cert-icon { background: rgba(34,168,107,.13); border: 1px solid rgba(34,168,107,.2); }
.mgk-trustc__cert--sfa     .mgk-trustc__cert-icon { background: rgba(21,101,192,.13); border: 1px solid rgba(21,101,192,.2); }
.mgk-trustc__cert--organic .mgk-trustc__cert-icon { background: rgba(240,152,48,.13); border: 1px solid rgba(240,152,48,.2); }
body .mgk-trustc__cert-thumb { width: 64px; height: 64px; border-radius: var(--mgk-radius); object-fit: cover; object-position: center; flex-shrink: 0; border: 1px solid var(--mgk-border); background: #fff; }
.mgk-trustc__cert-body { flex: 1; min-width: 0; }
.mgk-trustc__cert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.mgk-trustc__cert-title { font-size: 16px; font-weight: 700; margin: 0; color: var(--mgk-text); }
.mgk-trustc__cert--halal   .mgk-trustc__cert-title { color: var(--mgk-halal); }
.mgk-trustc__cert--sfa     .mgk-trustc__cert-title { color: var(--mgk-sfa); }
.mgk-trustc__cert--organic .mgk-trustc__cert-title { color: var(--mgk-organic); }
.mgk-trustc__cert-text { font-size: 14px; line-height: 1.6; color: var(--mgk-text-2); margin: 0 0 10px; }
.mgk-trustc__cert-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-trustc__cert-cta { margin-top: 4px; }
.mgk-trustc__cert-view { align-self: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--mgk-text); background: transparent; color: var(--mgk-text); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.mgk-trustc__cert-view:hover { background: var(--mgk-text); color: #fff; }
.mgk-trustc__home { background: #1363FF; border-color: #1363FF; }
.mgk-trustc__home:hover { background: #0f52d6; border-color: #0f52d6; }

/* Full-screen certificate image viewer (mirrors .mgk-invoice's modal pattern). */
.mgk-certview { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-certview[hidden] { display: none; }
.mgk-certview__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.mgk-certview__dialog { position: relative; z-index: 1; width: auto; max-width: min(900px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: var(--mgk-surface); border-radius: var(--mgk-radius); box-shadow: var(--mgk-shadow-lg); overflow: hidden; }
.mgk-certview__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--mgk-border); }
.mgk-certview__title { font-size: 16px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-certview__x { background: var(--mgk-bg-alt); border: none; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; color: var(--mgk-text-2); display: flex; align-items: center; justify-content: center; transition: background .15s; flex-shrink: 0; }
.mgk-certview__x:hover { background: var(--mgk-border); }
.mgk-certview__img { display: block; max-width: 100%; max-height: calc(90vh - 64px); width: auto; height: auto; object-fit: contain; margin: 0 auto; }

/* ── 039 Reviews (S-026) ──────────────────────────────────────
   Desktop design S-026 (1440 frame, 1200 content column inside 120px
   gutters): back link, heading + product name, ONE horizontal summary card
   (48px average on the left, 5→1 bars labelled with review COUNTS filling
   the rest), a blue "Write a review" button, then the review list as
   full-width rows divided by #A0B8C2 hairlines — no card per review. */
.mgk-rev { display: flex; flex-direction: column; align-items: stretch; gap: 0; max-width: 1200px; width: 100%; margin-inline: auto; }
/* .mgk-back is declared later in this file and would otherwise win on source
   order and paint the link grey; .mgk-rev scopes it up to the design's blue. */
.mgk-rev .mgk-rev__back { font-size: 13px; font-weight: 600; line-height: 16px; color: #1363FF; text-decoration: none; margin-bottom: 12px; }
.mgk-rev .mgk-rev__back:hover { color: #0F51D6; text-decoration: underline; }
.mgk-rev__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.mgk-rev__heading { font-size: 20px; font-weight: 700; line-height: 28px; color: #1A2630; margin: 0; }
.mgk-rev__product { font-size: 16px; font-weight: 500; line-height: 24px; color: #7A8E98; margin: 0; }

/* Summary card — horizontal split, 20px padding, 120px between the two sides. */
.mgk-rev__summary { display: flex; flex-direction: row; align-items: center; gap: 120px; padding: 20px; border: 1px solid #D5E2EE; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1); }
.mgk-rev__score { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; min-width: 116px; }
.mgk-rev__avg { font-size: 48px; font-weight: 700; line-height: 78px; color: #1A2630; text-align: center; }
.mgk-rev__avg-stars { font-size: 24px; line-height: 32px; color: var(--mgk-amber); text-align: center; }
.mgk-rev__count { font-size: 14px; font-weight: 400; line-height: 20px; color: #8A9FB5; text-align: center; margin: 4px 0 0; }
.mgk-rev__dist { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-width: 0; margin-top: 0; }
.mgk-rev__dist-row { display: flex; align-items: center; gap: 8px; }
.mgk-rev__dist-star { flex: none; width: 22px; font-size: 14px; font-weight: 500; line-height: 20px; color: #2A3C48; text-align: center; }
.mgk-rev__dist-bar { flex: 1 1 auto; min-width: 0; height: 8px; background: #D5E2EE; border-radius: 999px; overflow: hidden; }
.mgk-rev__dist-fill { display: block; height: 100%; background: var(--mgk-amber); border-radius: 999px; }
.mgk-rev__dist-n { flex: none; width: 28px; font-size: 14px; font-weight: 500; line-height: 20px; color: #2A3C48; text-align: center; }

.mgk-rev__subs { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.mgk-rev__sub-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--mgk-text-2); }
.mgk-rev__sub-score--green { color: var(--mgk-green); }
.mgk-rev__sub-score--amber { color: var(--mgk-amber); }

.mgk-rev__cta { display: flex; margin-top: 20px; }
.mgk-btn.mgk-rev__write { padding: 7px 15px; height: 36px; font-size: 16px; font-weight: 500; line-height: 22px; background: #1363FF; color: #fff; border-radius: 8px; }
.mgk-btn.mgk-rev__write:hover { background: #0F51D6; }

.mgk-rev__filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.mgk-rev__filter { padding: 6px 12px; font-size: 12px; font-weight: 600; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text); border-radius: var(--mgk-radius-sm); cursor: pointer; }
.mgk-rev__filter.is-sel { background: var(--mgk-navy); color: #fff; border-color: var(--mgk-navy); }

/* Review rows: 32px/20px padding, divided by a hairline, no card chrome. */
.mgk-rev__list { display: flex; flex-direction: column; margin-top: 20px; }
.mgk-rev__item { display: flex; flex-direction: column; padding: 32px 20px; border-bottom: 1px solid #A0B8C2; }
.mgk-rev__item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.mgk-rev__item-who { display: flex; align-items: center; gap: 8px; }
.mgk-rev__avatar { width: 32px; height: 32px; border-radius: 100px; background: var(--mgk-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
body .mgk-rev__avatar-img { width: 32px; height: 32px; border-radius: 100px; object-fit: cover; object-position: center; flex-shrink: 0; }
.mgk-rev__item-name { font-size: 18px; font-weight: 600; line-height: 28px; color: #3D5060; }
.mgk-rev__date { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
.mgk-rev__item-rating { display: flex; align-items: center; gap: 12px; }
.mgk-rev__item-stars { font-size: 20px; font-weight: 700; line-height: 28px; color: var(--mgk-amber); white-space: nowrap; }
.mgk-rev__verified { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 12px; font-weight: 500; line-height: 16px; color: #3491FA; background: #E8F7FF; border: 1px solid #3491FA; border-radius: 4px; }
.mgk-rev__title { font-size: 16px; font-weight: 600; line-height: 24px; color: #4A6580; margin: 8px 0 4px; }
.mgk-rev__text { font-size: 16px; font-weight: 500; line-height: 24px; color: #4A6580; margin: 8px 0; }
.mgk-rev__photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
body .mgk-rev__photo { width: 72px; height: 72px; border-radius: var(--mgk-radius-sm); object-fit: cover; object-position: center; border: 1px solid var(--mgk-border); }
.mgk-rev__actions { display: flex; gap: 12px; margin-top: 8px; }
.mgk-rev__act { font-size: 12px; color: var(--mgk-text-3); background: none; border: none; cursor: pointer; padding: 0; }
.mgk-rev__act:hover { opacity: .7; }

/* ── 039b Write-a-review modal (S-026) ───────────────────────
   610px card, 20px padding, 20px between blocks; a #E8F3FF moderation
   notice; rating stars / Title / Your review stacked 16px apart with 12px-
   radius #EFF2F6 inputs; and a right-aligned outlined Cancel + filled
   Submit pair. Submit rests at #94BFFF (the design's disabled fill) and
   goes solid #1363FF once a rating and body are present. */
.mgk-revmodal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.mgk-revmodal[hidden] { display: none; }
.mgk-revmodal__backdrop { position: absolute; inset: 0; background: rgba(6, 25, 55, .45); }
.mgk-revmodal__card {
	position: relative; z-index: 1; box-sizing: border-box;
	display: flex; flex-direction: column; gap: 20px;
	width: 610px; max-width: 100%; max-height: calc(100vh - 40px); overflow-y: auto;
	padding: 20px; background: #FFFFFF; border: 1px solid #D5E2EE; border-radius: 16px;
}
.mgk-revmodal__head { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 20px; }
.mgk-revmodal__title { margin: 0; font-size: 20px; font-weight: 600; line-height: 28px; color: #061937; }
.mgk-revmodal__x { flex: none; width: 24px; height: 24px; padding: 0; background: none; border: none; cursor: pointer; line-height: 0; }
.mgk-revmodal__x:hover { opacity: .7; }
.mgk-revmodal__notice {
	box-sizing: border-box; margin: 0; padding: 12px;
	background: #E8F3FF; border-radius: 8px;
	font-size: 14px; font-weight: 600; line-height: 20px; color: #1363FF;
}
.mgk-revmodal__form { display: flex; flex-direction: column; gap: 16px; }
.mgk-revmodal__field { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
/* Guest view (BR-21): no form at all, just the sign-in offer. Matches the
   notice above it in shape so the modal still reads as one panel. */
.mgk-revmodal__signin {
	box-sizing: border-box; margin: 0; padding: 12px;
	background: #F4F7FA; border-radius: 8px;
	font-size: 14px; font-weight: 500; line-height: 20px; color: #3C5064;
}
.mgk-revmodal__signin-link { font-weight: 700; color: #1363FF; text-decoration: underline; }
.mgk-revmodal__signin-link:focus-visible { outline: 2px solid #1363FF; outline-offset: 2px; }
/* Retained for the mockup's two-up field rows. */
.mgk-revmodal__row { display: flex; flex-direction: row; gap: 12px; }
.mgk-revmodal__row > .mgk-revmodal__field { flex: 1 1 0; }
.mgk-revmodal__label { font-size: 14px; font-weight: 600; line-height: 18px; color: #061937; }
.mgk-revmodal__opt { font-weight: 500; color: #7A8E98; }
/* Stars: radios drive the state, labels are the hit targets. Reversed row
   order + the ~ sibling combinator light every star up to the hovered/checked
   one without any script. */
.mgk-revmodal__stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; }
.mgk-revmodal__star-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mgk-revmodal__star { font-size: 24px; line-height: 32px; color: rgba(0, 64, 93, .22); cursor: pointer; transition: color .12s; }
.mgk-revmodal__star:hover,
.mgk-revmodal__star:hover ~ .mgk-revmodal__star,
.mgk-revmodal__star-input:checked ~ .mgk-revmodal__star { color: var(--mgk-amber); }
.mgk-revmodal__star-input:focus-visible + .mgk-revmodal__star { outline: 2px solid #1363FF; outline-offset: 2px; border-radius: 2px; }
.mgk-revmodal__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mgk-revmodal__input,
.mgk-revmodal__textarea {
	box-sizing: border-box; width: 100%; padding: 16px;
	background: #FFFFFF; border: 1px solid #EFF2F6; border-radius: 12px;
	font-family: inherit; font-size: 14px; font-weight: 400; line-height: 18px; color: #061937;
}
.mgk-revmodal__input { height: 50px; }
.mgk-revmodal__textarea { height: 165px; resize: vertical; }
.mgk-revmodal__input::placeholder,
.mgk-revmodal__textarea::placeholder { color: #7A8E98; }
.mgk-revmodal__input:focus,
.mgk-revmodal__textarea:focus { outline: none; border-color: #1363FF; }
.mgk-revmodal__error { margin: 0; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--mgk-red, #D92D20); }
.mgk-revmodal__foot { display: flex; flex-direction: row; justify-content: flex-end; align-items: flex-start; gap: 12px; }
.mgk-revmodal__btn {
	box-sizing: border-box; display: inline-flex; justify-content: center; align-items: center;
	height: 36px; padding: 7px 20px; border-radius: 8px;
	font-family: inherit; font-weight: 500; line-height: 22px; cursor: pointer;
}
.mgk-revmodal__btn--cancel { font-size: 14px; color: #1363FF; background: none; border: 1px solid #1363FF; }
.mgk-revmodal__btn--cancel:hover { background: #E8F3FF; }
.mgk-revmodal__btn--submit { font-size: 16px; color: #FFFFFF; background: #1363FF; border: none; }
.mgk-revmodal__btn--submit:hover:not(:disabled) { background: #0F51D6; }
.mgk-revmodal__btn--submit:disabled { background: #94BFFF; cursor: not-allowed; }

@media (max-width: 640px) {
	.mgk-revmodal { padding: 12px; }
	.mgk-revmodal__card { width: 100%; gap: 16px; padding: 16px; border-radius: 16px; }
	.mgk-revmodal__row { flex-direction: column; gap: 16px; }
	.mgk-revmodal__textarea { height: 120px; }
	/* 16px minimum, or iOS Safari zooms the page on focus. */
	.mgk-revmodal__input, .mgk-revmodal__textarea { font-size: 16px; }
	/* Full-width stacked buttons, submit first — the phone idiom used by the
	   other sheets rather than a right-aligned desktop pair. */
	.mgk-revmodal__foot { flex-direction: column-reverse; gap: 8px; }
	.mgk-revmodal__btn { width: 100%; min-height: 44px; height: auto; border-radius: 22px; font-weight: 700; }
}

/* ── 040 Seasonal Landing (S-027) ───────────────────────────── */
/* Page-level title, above the hero — the page's one H1 (the hero's own
   title, campaign name or generic fallback, is an H2; see seasonal-landing.php). */
/* .mgk-section.mgk-seasonal (the hero's own ancestor) is full-bleed, NOT
   centered — see the max-width:none override at line ~1015 — so this title
   must match that SAME full-bleed convention (fixed left padding, no
   max-width/margin:auto) instead of centering itself; centering it would
   drift away from the hero content at any viewport wider than 1440px. */
.mgk-seasonal__pagehead { background: #fff; padding: 28px 0; }
/* padding-left 64px = the hero's own 24px side padding + its 40px inner
   padding (.mgk-seasonal__hero--image-only/--photo) — flush with the
   campaign name/badges inside the hero below it, not with the hero's outer edge. */
.mgk-seasonal__pagetitle { padding: 0 24px 0 64px; font-size: 32px; font-weight: 800; color: var(--mgk-navy-900); box-sizing: border-box; }
.mgk-seasonal { display: flex; flex-direction: column; gap: 24px; }
.mgk-seasonal__hero { position: relative; overflow: hidden; border-radius: var(--mgk-radius); background: linear-gradient(135deg, #1A5C1A, #2E7D32); color: #fff; padding: 48px 36px; }
/* Merchant-uploaded campaign banner (mgk_season_campaign featured image)
   replaces the gradient; a dark overlay keeps the hero text readable over
   any photo. */
.mgk-seasonal__hero--banner { background-size: cover; background-position: center; }
.mgk-seasonal__hero--banner::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 0; }
/* Merchant-campaign mode: the imported banner IS the hero, full-bleed, no
   text/badge/CTA overlay — see seasonal-landing.php's $mgk_blocks branch. */
.mgk-seasonal__hero--image-only { position: relative; display: flex; align-items: center; height: clamp(280px, 30vw, 360px); min-height: 280px; background: var(--mgk-bg-alt); padding: 36px 40px; }
.mgk-seasonal__hero-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: var(--mgk-radius); }
.mgk-seasonal__hero--image-only .mgk-seasonal__hero-overlay { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(6,25,55,.88) 0%, rgba(6,25,55,.58) 44%, rgba(6,25,55,.08) 78%); }
.mgk-seasonal__hero--image-only .mgk-seasonal__hero-body { position: relative; z-index: 1; max-width: 560px; }
.mgk-seasonal__hero-body { position: relative; z-index: 1; max-width: 560px; }
.mgk-seasonal__badge { margin-bottom: 12px; }
.mgk-seasonal__heading { font-size: 30px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.mgk-seasonal__sub { font-size: 14px; line-height: 1.6; color: rgba(220,252,231,.92); margin: 0 0 20px; }
.mgk-seasonal__hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.mgk-seasonal__hero-moon { position: absolute; right: 24px; top: 0; font-size: 160px; opacity: .15; user-select: none; line-height: 1.2; }
/* Photo hero (real merchant campaign): full-bleed background photo, dark
   bottom-weighted gradient scrim for legible white text, content pinned to
   the bottom-left like the reference design. */
.mgk-seasonal__hero--photo { position: relative; overflow: hidden; border-radius: var(--mgk-radius); min-height: 300px; background-color: var(--mgk-navy); display: flex; align-items: center; padding: 40px; color: #fff; }
.mgk-seasonal__hero--photo.mgk-seasonal__hero--has-image { display: grid; grid-template-columns: 1fr minmax(280px, 42%); padding: 0; align-items: stretch; }
.mgk-seasonal__hero-photo { display: block; grid-column: 2; grid-row: 1; width: 100%; height: 100%; min-height: 300px; object-fit: cover; object-position: right center; }
.mgk-seasonal__hero--has-image .mgk-seasonal__hero-body { grid-column: 1; grid-row: 1; align-self: center; padding: 36px 40px; }
.mgk-seasonal__hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.75) 100%); z-index: 0; }
.mgk-seasonal__hero--photo .mgk-seasonal__hero-body { position: relative; z-index: 1; max-width: 620px; }
.mgk-seasonal__hero--photo .mgk-seasonal__heading { color: #fff; }
.mgk-seasonal__hero--photo .mgk-seasonal__sub { color: rgba(255,255,255,.88); }
.mgk-seasonal__hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mgk-seasonal__hero-pill, .mgk-seasonal__hero-pill-date { display: inline-flex; align-items: center; padding: 6px 14px; font-size: 12px; font-weight: 700; border-radius: 999px; }
.mgk-seasonal__hero-pill { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.mgk-seasonal__hero-pill-date { background: #E4342F; color: #fff; }
.mgk-seasonal__section { display: flex; flex-direction: column; }
/* The legacy "meats"/"kueh" fallback cards (no live campaign) now render via
   shared/prod-card.php (.mgk-prod), same as every other product grid — the
   old standalone .mgk-seasonal__meat / .mgk-seasonal__kueh card markup/CSS is
   gone. See seasonal-landing.php's .mgk-seasonal__meat-wrap/-kueh-wrap. */
/* Category grid — one photo tile per campaign, whole tile is the click
   target, title/count pinned bottom-left, circular arrow button bottom-right. */
/* auto-fit for the same reason as Home's rows: the section is full-bleed now, so
   three hard columns turned all the extra width into enormous cards — measured
   451px @1440 but 824px @2560, nearly double the design size.
   The floor is 448px, NOT Home's 256px: these are banner-style category tiles
   (background photo + gradient overlay + 18px title, min-height 220px), a
   different card family from the product card. Syncing them to the product
   card's 256px would put 9 tiles across a wide screen and shrink the titles out
   of proportion. What is shared with Home is the BEHAVIOUR — cards hold their
   design size and extra width becomes more columns.
   448 and not the exact design width: 3 columns at the 1440px frame need
   floor*3 + 2*20 gap <= 1392, i.e. floor <= 450.67. A 451px floor (the measured
   card width, rounded up) overshoots that by a third of a pixel and auto-fit
   silently drops to TWO columns — 686px tiles, worse than the problem being
   fixed. 448px leaves headroom for the rounding.
   BUT auto-fit's 3-column window only holds for ~1392px-1880px effective width
   (section width minus 48px padding). Very common 1280/1366px laptop viewports
   fall BELOW that window (1232px/1318px available) and silently collapse to
   TWO wide columns — the bug this hard <=1400px breakpoint fixes (1366px's
   1318px available still needs covering), forcing 3 columns down to a width
   where the 640/960px blocks below take over instead of leaving a no-man's-
   land where cards stretch into full-width banners. */
.mgk-seasonal__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(448px, 1fr)); gap: 20px; }
@media (min-width: 961px) and (max-width: 1400px) { .mgk-seasonal__grid { grid-template-columns: repeat(3, 1fr); } }
.mgk-seasonal__card { position: relative; display: block; min-height: 220px; border-radius: var(--mgk-radius); overflow: hidden; background-color: var(--mgk-bg-alt); background-size: cover; background-position: center; text-decoration: none; transition: box-shadow .15s ease; }
.mgk-seasonal__card:hover { box-shadow: var(--mgk-shadow-lg); }
.mgk-seasonal__card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.78) 100%); }
.mgk-seasonal__card-body { position: absolute; left: 16px; right: 56px; bottom: 16px; z-index: 1; }
.mgk-seasonal__card-title { display: block; font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.mgk-seasonal__card-meta { display: block; font-size: 13px; color: rgba(255,255,255,.9); margin-top: 4px; }
.mgk-seasonal__card-arrow { position: absolute; right: 14px; bottom: 14px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--mgk-navy); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
@media (max-width: 960px) { .mgk-seasonal__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mgk-seasonal__grid { grid-template-columns: 1fr; } }
/* ── PDPA & Cookie Preferences modal (replaces the old standalone S-028 page) ── */
/* Same .mgk-addrmodal convention (fixed overlay, blurred backdrop, centered
   card) — a compact popup instead of a full page: blue title, X close, plain
   rounded-rect rows (grey background + disabled switch for the required
   Essential row, white/bordered + live switch for the rest). */
.mgk-pdpamodal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-pdpamodal[hidden] { display: none; }
.mgk-pdpamodal__backdrop { position: absolute; inset: 0; background: rgba(27,58,82,.55); backdrop-filter: blur(2px); }
.mgk-pdpamodal__card { position: relative; z-index: 1; width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; background: var(--mgk-surface); border-radius: 20px; box-shadow: var(--mgk-shadow-lg); padding: 28px; }
.mgk-pdpamodal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.mgk-pdpamodal__title { font-size: 24px; font-weight: 700; color: var(--mgk-blue); margin: 0; }
/* Lives in .__cats (the first child) rather than the header row, so that the
   phone sheet can scroll it with the cards — see § 314. On desktop it keeps its
   original place under the title; the header's 8px + this 20px reproduce the
   20px gap the old markup had. */
.mgk-pdpamodal__sub { font-size: 14px; line-height: 1.6; color: var(--mgk-text-2); margin: 0 0 12px; }
.mgk-pdpamodal__x { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--mgk-bg-alt); color: var(--mgk-text-2); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mgk-pdpamodal__x:hover { background: var(--mgk-border); }
.mgk-pdpamodal__cats { display: flex; flex-direction: column; gap: 14px; }
.mgk-pdpamodal__cat { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: 14px; padding: 18px 20px; }
.mgk-pdpamodal__cat.is-locked { background: var(--mgk-bg-alt); border-color: transparent; }
.mgk-pdpamodal__cat-body { flex: 1; }
.mgk-pdpamodal__cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.mgk-pdpamodal__cat-name { font-size: 16px; font-weight: 600; color: var(--mgk-navy); margin: 0; }
.mgk-pdpamodal__cat-desc { font-size: 13px; line-height: 1.55; color: var(--mgk-text-2); margin: 0; }
.mgk-pdpamodal__cat-chip { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; background: var(--mgk-navy); color: #fff; }
.mgk-pdpamodal__toggle { position: relative; width: 52px; height: 28px; border-radius: 999px; background: var(--mgk-border); flex-shrink: 0; cursor: pointer; transition: background .15s; }
.mgk-pdpamodal__toggle.is-on { background: var(--mgk-blue); }
.mgk-pdpamodal__toggle.is-locked { opacity: .6; cursor: default; }
.mgk-pdpamodal__knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.mgk-pdpamodal__toggle.is-on .mgk-pdpamodal__knob { left: 27px; }
/* Phone-only parts of the PDPA sheet (mockup lines 3749, 3752-3754). On desktop
   each toggle already persists the instant it is flipped, so there is nothing to
   commit and no batch-save copy to explain. § 314 turns both on at ≤640px. */
.mgk-pdpamodal__audit { display: none; }
.mgk-pdpamodal__foot { display: none; }
.mgk-consent__status { text-align: center; font-size: 14px; font-weight: 600; margin: 14px 0 0; }
.mgk-consent__status.is-ok { color: var(--mgk-green); }
.mgk-consent__status.is-err { color: var(--mgk-red); }
.mgk-chip--blue { background: var(--mgk-blue); color: #fff; border: 1px solid var(--mgk-blue); }

/* FL-01 site-wide cookie banner (FR-HP-03, BR-13) */
.mgk-cookiebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; justify-content: center; padding: 16px; pointer-events: none; }
.mgk-cookiebar__card { pointer-events: auto; width: 100%; max-width: 920px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; background: var(--mgk-surface); border: 2px solid var(--mgk-navy); border-radius: var(--mgk-radius-sm); box-shadow: var(--mgk-shadow-lg); padding: 16px 20px; }
.mgk-cookiebar__text { flex: 1 1 380px; font-size: 13px; line-height: 1.6; color: var(--mgk-text-2); margin: 0; }
.mgk-cookiebar__link { color: var(--mgk-teal); text-decoration: none; }
.mgk-cookiebar__link:hover { text-decoration: underline; }
.mgk-cookiebar__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 640px) { .mgk-cookiebar__actions { width: 100%; } .mgk-cookiebar__actions .mgk-btn { flex: 1 1 auto; } }

/* ── 042 Support & WhatsApp (S-029) ─────────────────────────── */
.mgk-support { display: flex; flex-direction: column; position: relative; }
.mgk-support__panel {
	box-sizing: border-box;
	display: flex; flex-direction: column; align-items: stretch;
	padding: 32px; gap: 32px;
	width: 100%;
	background: #FFFFFF; border: 1px solid #D7D7DB; border-radius: 24px;
}
.mgk-support__title-block { display: flex; flex-direction: column; gap: 0; }
.mgk-support__heading { font-family: 'Quicksand', var(--mgk-font); font-size: 20px; font-weight: 700; line-height: 28px; color: #1B3A52; margin: 0; }
.mgk-support__intro { display: block; margin: 0; font-family: 'Quicksand', var(--mgk-font); font-size: 16px; line-height: 24px; font-weight: 400; color: #717182; }

/* Contact cards */
.mgk-support__contacts { display: flex; gap: 16px; }
.mgk-support__contact {
	box-sizing: border-box;
	display: flex; flex-direction: column; align-items: stretch;
	flex: 1 1 0; padding: 24px; gap: 20px;
	border-radius: 16px; text-align: left;
}
.mgk-support__contact--green { background: #EAFAF3; }
.mgk-support__contact--sfa   { background: #E3F0FF; }
.mgk-support__contact--plain { background: #EBF0F6; }
.mgk-support__contact-header { display: flex; flex-direction: column; gap: 6px; }
.mgk-support__contact-name { font-family: 'Quicksand', var(--mgk-font); font-size: 16px; font-weight: 700; line-height: 24px; color: #1B3A52; margin: 0; }
.mgk-support__contact-desc { font-family: 'Quicksand', var(--mgk-font); font-size: 24px; font-weight: 400; line-height: 32px; color: #1B3A52; margin: 0; }
.mgk-support__contact--green .mgk-support__contact-desc { color: #22A86B; }
.mgk-support__contact--sfa   .mgk-support__contact-desc { color: #1363FF; }
.mgk-support__contact-cta {
	width: 100%; box-sizing: border-box;
	display: flex; align-items: center; justify-content: center;
	padding: 5px 16px; background: #1363FF; border-radius: 8px;
	font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 400; line-height: 22px; color: #FFFFFF;
}

/* FAQ */
.mgk-support__faq { display: flex; flex-direction: column; gap: 16px; }
.mgk-support__faq-title { font-family: 'Quicksand', var(--mgk-font); font-size: 20px; font-weight: 700; line-height: 28px; color: #1B3A52; margin: 0; }
.mgk-support__faq-list { display: flex; flex-direction: column; gap: 12px; }
.mgk-support__faq-item { box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; border: 1px solid #E5E6EB; border-radius: 12px; padding: 20px; }
/* Desktop showed every answer at once and keeps doing so. <details> cannot be
   forced open from CSS, so the element ships WITH the `open` attribute and the
   phone block (§ 315) is what allows collapsing — see the summary's pointer
   rules there. Here the disclosure affordances are simply hidden. */
.mgk-support__faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: 'Quicksand', var(--mgk-font); font-size: 16px; font-weight: 600; line-height: 24px; color: #1B3A52; margin: 0; cursor: default; list-style: none; }
.mgk-support__faq-q::-webkit-details-marker { display: none; }
.mgk-support__faq-q::marker { content: ''; }
.mgk-support__faq-qtext::before { content: none; }
.mgk-support__faq-mark { flex: none; width: 16px; height: 16px; border: 1.5px solid #292D32; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); margin-top: -4px; }
.mgk-support__faq-a { font-family: 'Quicksand', var(--mgk-font); font-size: 14px; font-weight: 400; line-height: 20px; color: #717182; margin: 0; }
.mgk-support__faq-more { font-family: 'Inter', var(--mgk-font); font-size: 13px; font-weight: 600; line-height: 16px; color: #1363FF; text-decoration: none; }
.mgk-support__faq-more:hover { text-decoration: underline; }

.mgk-support__contact-cta, .mgk-support__widget-cta { background: #1363FF; }
.mgk-support__widget { display: none; }
.mgk-support__widget-card { max-width: 300px; box-shadow: var(--mgk-shadow-lg); }
.mgk-support__widget-card[hidden] { display: none; }
.mgk-support__widget-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mgk-support__widget-avatar { width: 32px; height: 32px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.mgk-support__widget-name { font-size: 14px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-support__widget-status { font-size: 12px; color: var(--mgk-green); margin: 0; }
.mgk-support__widget-msg { font-size: 12px; color: var(--mgk-text-2); margin: 0 0 8px; }
.mgk-support__widget-cta { width: 100%; }
.mgk-support__widget-fab { width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: var(--mgk-shadow-lg); cursor: pointer; text-decoration: none; border: none; flex-shrink: 0; }
a.mgk-support__contact-cta, a.mgk-support__widget-cta { text-decoration: none; }
@media (max-width: 640px) {
	.mgk-support__widget { right: 16px; bottom: 16px; }
	.mgk-support__widget-card { max-width: calc(100vw - 32px); }
}

/* ── Retail: narrow page width helper ──────────────────────── */
.mgk-section--narrow { max-width: 720px; }

/* Shared inline back-link (Design flow "← Back to X" across shopper screens) */
.mgk-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--mgk-text-3); text-decoration: none; margin-bottom: 8px; }
.mgk-back:hover { color: var(--mgk-teal); }
.mgk-ohist__back svg { flex: none; width: 20px; height: 20px; }

/* Footer action rows added for Design inter-screen navigation */
.mgk-trustc__footer, .mgk-loyalty__actions, .mgk-subm__footer { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.mgk-pay__terms-link, .mgk-consent__legal-link { color: var(--mgk-teal); text-decoration: none; }
.mgk-pay__terms-link:hover, .mgk-consent__legal-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════════════
 * "Start Here" shopper screens — LANDING · SALE · PROFILE · VOUCHERS
 * ════════════════════════════════════════════════════════════════════════════ */

/* ── LANDING ── */
.mgk-btn--cta { background: var(--mgk-cta-blue); color: #fff; }

/* Overrides .mgk-section's own max-width/margin: the page wrapper itself must
   stay unconstrained so .mgk-land__hero (a direct child) can run full-bleed
   edge-to-edge. .mgk-land__values/.mgk-land__cats below cap themselves at
   var(--mgk-maxw) independently, so they still line up in their own column. */
.mgk-section.mgk-land { max-width: none; margin: 0; }
.mgk-land { display: flex; flex-direction: column; gap: 0; padding: 0; background: var(--mgk-surface); }
.mgk-land__signup { white-space: nowrap; }

/* Hero — single flat image (heading/sub/CTA/trust badges all baked into the
   exported design asset). Full-bleed: zero padding/margin so the banner runs
   edge-to-edge, unlike .mgk-land__values/.mgk-land__cats below which keep
   the page's normal side padding. */
.mgk-land__hero { padding: 0; margin: 0; max-width: none; width: 100%; box-sizing: border-box; background: var(--mgk-surface); }
.mgk-land__hero-banner { display: block; width: 100%; height: auto; border-radius: 0; }

.mgk-land__values, .mgk-land__cats { padding: 8px var(--mgk-pad-x) 40px; max-width: var(--mgk-maxw); margin: 0 auto; width: 100%; box-sizing: border-box; }
.mgk-land__value { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.mgk-land__value-media { height: 176px; background: var(--mgk-bg-alt); display: flex; align-items: center; justify-content: center; overflow: hidden; }
body .mgk-land__value-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-land__value-ph { font-size: 56px; }
.mgk-land__value-title { font-size: 16px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; padding: 20px 20px 8px; }
.mgk-land__value-desc { font-size: 14px; line-height: 1.6; color: var(--mgk-text-2); margin: 0; padding: 0 20px 20px; }
.mgk-land__cat { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; text-decoration: none; transition: box-shadow .15s ease; }
.mgk-land__cat:hover { box-shadow: var(--mgk-shadow-lg); }
.mgk-land__cat-media { height: 128px; background: var(--mgk-bg-alt); display: flex; align-items: center; justify-content: center; overflow: hidden; }
body .mgk-land__cat-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.mgk-land__cat-ph { font-size: 44px; }
.mgk-land__cat-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; }
.mgk-land__cat-name { font-size: 14px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; }
.mgk-land__cat-count { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-land__cat-arrow { font-size: 20px; color: var(--mgk-cta-blue); }


/* ── SALE / FRESH DEALS ── */
/* Full-bleed root (no .mgk-section max-width — that class used to wrap this
   <section> and bo the hero banner image down to the content column instead
   of letting it span edge-to-edge like Home's Hero/Appliance banners).
   .mgk-sale__body is the max-width-capped column for tabs/toolbar/grid. */
.mgk-sale { display: flex; flex-direction: column; gap: 0; padding: 0; width: 100%; }
.mgk-sale__body { display: flex; flex-direction: column; gap: 0; }
/* Hero + countdown share one full-bleed section. No-banner fallback: plain
   red gradient) — no overlaid copy/pills/countdown, purely the banner
   artwork. */
.mgk-sale__hero { position: relative; overflow: hidden; min-height: 220px; background: linear-gradient(135deg, var(--mgk-red) 0%, #B91C1C 100%); }
/* Locked to the campaign banner artwork's own aspect ratio (2560x875, the
   uploaded source size) so the full image always shows uncropped instead of
   being cover-cropped to fit an unrelated fixed height. */
.mgk-sale__hero--banner { min-height: 0; aspect-ratio: 2560 / 875; background: none; background-size: cover; background-position: center; }

/* Filter bar (2nd section) — Figma "TabsRow": category tabs centered-left,
   live countdown clock right, in one 104px-tall row. Dark navy pill for the
   active/"All Deals" tab (with a white count badge), light #F1F5F9 pills
   for the rest, and three #FFECE8 boxes for HRS/MIN/SEC. */
/* The white band stays FULL-BLEED (page bg is #F4F7FB — capping the band
   itself would show grey gutters past 1440px). __filterbar-inner is the
   content column: same max-width --mgk-maxw + --mgk-pad-x gutters as
   .mgk-sale__toolbar / __herodeal-wrap / __grid below, so the tabs' left edge
   and the clock's right edge line up with the cards underneath. The old
   `padding: 12px 32px` + `margin: 0 auto` on both children pushed tabs and
   clock toward the middle instead. */
/* Faint divider separating the tabs/countdown filter bar from "Hot deals
   right now" below — mobile (≤640px) already had its own border-bottom here
   (further down this file); desktop had none. */
.mgk-sale__filterbar { background: #FFFFFF; border-bottom: 1px solid var(--mgk-border); }
/* Full-bleed (max-width: none) since the sections on Category/Search/Home went
   full-bleed — the comment above still holds, this column just runs the whole
   viewport now. All four Sale wrappers (__filterbar-inner, __toolbar,
   __herodeal-wrap, __grid) must change TOGETHER or the tabs/clock stop lining up
   with the cards underneath, which is the alignment this block exists to keep. */
/* min-height, not height: a fixed height clips instead of growing whenever
   the tabs wrap onto a 2nd row (enough sale categories at a given viewport
   width), and the fixed box's normal-flow sibling below (.mgk-sale__toolbar,
   "Hot deals right now") then overlaps the clipped-off row instead of being
   pushed down. auto lets the row grow with the tabs; min-height keeps the
   usual single-row look everywhere else. */
.mgk-sale__filterbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 104px; height: auto; padding: 12px var(--mgk-pad-x); max-width: none; margin: 0; width: 100%; box-sizing: border-box; }
.mgk-sale__tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.mgk-sale__tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; background: #F1F5F9; border: none; border-radius: 999px; color: #1B3A52; font-family: 'Quicksand', inherit; font-size: 14px; font-weight: 600; line-height: 20px; padding: 10px 18px; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.mgk-sale__tab.is-active { background: #1B3A52; color: #fff; font-weight: 700; }
.mgk-sale__tab-count { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 2px 7px; border-radius: 999px; background: #FFFFFF; color: #1B3A52; font-family: 'Quicksand', inherit; font-size: 12px; font-weight: 700; line-height: 16px; }
.mgk-sale__tab-count[hidden] { display: none; }
.mgk-sale__countdown { display: flex; justify-content: flex-end; align-items: center; margin: 0; flex-shrink: 0; }
.mgk-sale__clock { display: flex; align-items: center; gap: 12px; }
.mgk-sale__clock-seg { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 80px; height: 80px; background: #FFECE8; border-radius: 12px; padding: 8px 16px; box-sizing: border-box; }
.mgk-sale__clock-num { color: #DE100E; font-family: 'Quicksand', inherit; font-weight: 700; font-size: 30px; line-height: 36px; text-align: center; }
.mgk-sale__clock-unit { color: #DE100E; font-family: 'Quicksand', inherit; font-weight: 500; font-size: 20px; line-height: 28px; text-align: center; }
.mgk-sale__clock-sep { display: flex; align-items: center; color: #DE100E; font-family: 'Quicksand', inherit; font-weight: 700; font-size: 30px; line-height: 36px; }
@media (max-width: 780px) {
	/* Mobile is unchanged from the pre-alignment layout: stacked, and back on
	   the original flat 32px gutter (NOT --mgk-pad-x) — the content-column
	   alignment above is a desktop-only concern. */
	.mgk-sale__filterbar-inner { flex-direction: column; align-items: stretch; height: auto; padding: 12px 32px; }
	.mgk-sale__tabs, .mgk-sale__countdown { margin: 0; }
	.mgk-sale__countdown { justify-content: center; }
	/* Without this, the tabs keep the desktop base rule's flex-wrap:wrap and
	   this store's 7+ status pills (All Deals + 6 Premium Beef Package tabs)
	   wrap across 2-3 rows — pushing the countdown (a sibling stacked below,
	   now in a column) down by however many extra rows that is, landing it
	   right on top of "Hot deals right now" instead of a fixed spot under the
	   hero. Scrolling on one row, same fix the ≤640px block already applies,
	   keeps this row's height constant regardless of tab count. */
	/* min-width:0 + max-width/width:100% are what make overflow-x actually
	   scroll instead of growing to the tabs' full unwrapped content width
	   (~1000px+ for 7 pills) — a flex item's automatic minimum size is its
	   content width, and without this override that width forces the whole
	   filterbar (and everything centered in it, incl. the countdown) wider
	   than the viewport, which just clips off-screen since the page itself
	   has no horizontal scroll. Same fix already used at ≤640px. */
	.mgk-sale__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; width: 100%; }
	.mgk-sale__tabs::-webkit-scrollbar { display: none; }
	/* Without flex:0 0 auto + nowrap, tabs shrink to fit instead of scrolling
	   and "Beef & Veal" / "Premium Beef Package N" wrap onto a second line. */
	.mgk-sale__tab { flex: 0 0 auto; white-space: nowrap; }
}
/* max-width: none — see the note on .mgk-sale__filterbar-inner; all four Sale
   content columns go full-bleed together. */
.mgk-sale__toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px var(--mgk-pad-x) 0; max-width: none; margin: 0; width: 100%; }
.mgk-sale__toolbar-heading { font-size: 18px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-sale__count { font-size: 14px; color: var(--mgk-text-2); margin: 0; }
.mgk-sale__sort { display: flex; align-items: center; gap: 8px; }
.mgk-sale__sort-label { font-size: 14px; color: var(--mgk-text-3); }
/* The native arrow is drawn hard against the padding edge, which on this
   999px pill left it touching the border. Replaced with the same inline-SVG
   caret .mgk-seasoncamp__select uses: 16px glyph inset 12px from the border,
   with padding-right opened to 38px so the label text clears it.

   Vertical centring comes from an explicit height + matching line-height and
   no vertical padding — the pattern .mgk-coltabs__sort-select already uses.
   Vertical padding alone left the text off-centre: once appearance:none is set
   the browser no longer centres the selected option itself, so the text is
   positioned by line box rather than by the padding box.

   padding-left is 8px, not the pill's usual 16px, so the closed control's text
   lines up with the option list the browser drops below it. That popup is
   native: it anchors to the select's BORDER box and indents its own rows by a
   few px, none of which CSS can reach. Matching it from this side is the only
   way to keep "Biggest Discount" in the same column open and closed. */
.mgk-sale__sort-select { -webkit-appearance: none; appearance: none; box-sizing: border-box; height: 36px; line-height: 20px; border: 1px solid var(--mgk-border); color: var(--mgk-text); background-color: var(--mgk-surface); border-radius: 999px; padding: 0 38px 0 8px; font-size: 13px; font-family: inherit; cursor: pointer; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3A52' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }

/* Hero Deal — one large standalone card, the FIRST CELL of the deal grid
   (first real deal). Horizontal layout (image left, details right), spanning
   the full width of the grid row — matches the reference mockup's side-by-side
   hero (not a stacked image-on-top layout).

   `grid-column: 1 / -1` is what keeps this looking like the standalone block it
   used to be: the markup now lives INSIDE .mgk-sale__grid (sale.php) so that the
   phone layout can render it as an ordinary grid cell instead of a lone card on
   its own row. Spanning every column reproduces the previous desktop result.
   No padding/max-width here any more — the grid owns both. */
.mgk-sale__herodeal-wrap { grid-column: 1 / -1; width: 100%; box-sizing: border-box; padding: 0 0 4px; }
/* align-items: FLEX-START, not stretch. With stretch, the media and the body
   each grew to the tallest of the two and the media had no height ceiling
   (min-height:260px, no max), so the row settled at the media's own portrait
   aspect ratio: a 228x300 source photo rendered 537x710 on desktop, leaving ~500px
   of empty white under the "Add" button. Flex-start lets each side keep its own
   height, and the media's aspect-ratio below decides the photo's shape. */
.mgk-sale__herodeal { display: flex; flex-direction: row; gap: 0; align-items: flex-start; padding: 0; width: 100%; box-sizing: border-box; border-radius: 20px; box-shadow: none; overflow: hidden; }
/* LANDSCAPE photo (wider than tall), 16/10. The height now comes from the
   aspect-ratio against the 40% flex width instead of from the flex row, so the
   photo can no longer be stretched vertically by the body beside it, and a
   portrait source is cropped to landscape by the object-fit:cover below rather
   than forcing the whole card to grow. min-height is dropped: with a ratio it
   would only fight the shape (at narrow widths it re-introduced the tall box). */
.mgk-sale__herodeal-media { position: relative; display: block; flex: 0 0 40%; aspect-ratio: 16 / 10; border-radius: 20px 0 0 20px; overflow: hidden; background: var(--mgk-bg-alt); }
/* Desktop only (>780px, above the stacked-mobile breakpoint below): pin the
   photo's width share to the Figma "FeaturedDeal" spec — 480/1376 = 34.88% of
   a 1376-wide card at the 1440 desktop frame — taken as a PROPORTION so it
   holds at any viewport wider than the mobile breakpoint, not just literally
   1440px. Kept as a min-width override (not baked into the 40% rule above)
   so the mobile block below is untouched. */
@media (min-width: 781px) { .mgk-sale__herodeal-media { flex-basis: 34.88%; } }
/* object-position 50% 35%, not dead centre: the landscape 16/10 box crops a tall
   product photo top and bottom, and product shots put the item slightly above the
   middle (the lower part is usually surface/shadow). Biasing the visible window
   up keeps the product in frame instead of cropping its top off. `cover` is kept
   over `contain` on purpose — contain would letterbox the tall source inside grey
   bars and read as a portrait photo again, which is what this rule set out to
   fix. The trade-off is that a very tall source still loses its top and bottom
   edges here. */
/* `> img` (direct child), NOT a descendant selector: the sale-tag strip is also
   inside .mgk-sale__herodeal-media, so a plain `-media img` matched the TAG's own
   image too. Both that rule and `body .mgk-sale__herodeal-saletag img` (line ~460)
   are specificity (0,2,1), so this one won on source order alone and replaced the
   tag's `object-position: center` with the 35% bias below — which cropped the
   bottom off the banner text ("FREESHIP S$0" sliced in half). The child combinator
   keeps this to the product photo, which is the only direct <img> child. */
body .mgk-sale__herodeal-media > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
/* Boxy badge (not the shared pill .mgk-sale__deal-tag uses on the grid cards
   below it) — Figma "Discount": bigger glyph, rounded-square corners, a 2px
   white ring so it reads on top of any photo. Scoped to the hero only so the
   20+ grid cards keep their existing compact pill. */
.mgk-sale__herodeal-tag { top: 16px; left: 16px; font-size: 18px; line-height: 28px; font-weight: 700; padding: 8px 12px; border-radius: 12px; border: 2px solid #FFFFFF; box-sizing: border-box; }
/* justify-content: CENTER, not space-between. The card's height comes from
   the photo (align-items:flex-start on the row, aspect-ratio on the media —
   see above), which is taller than this column's own content needs, so
   space-between stretched the 12px gaps out to fill the leftover space
   (15-19px between rows instead of 12px). Center keeps every row's own gap
   fixed at 12px and pools the leftover space as margin above/below instead. */
.mgk-sale__herodeal-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding: 24px 28px; align-self: stretch; justify-content: center; box-sizing: border-box; }
.mgk-sale__herodeal-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mgk-sale__herodeal-name { font-size: 24px; line-height: 32px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; }
.mgk-sale__herodeal-prices { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.mgk-sale__herodeal-price { font-size: 36px; line-height: 40px; font-weight: 700; color: #C5342A; }
.mgk-sale__herodeal-was { font-size: 18px; color: var(--mgk-text-3); text-decoration: line-through; }
/* Desktop: matches Home's Flash Sale card CTA (.mgk-flashcard__buy) exactly
   — #1363FF, not .mgk-btn--cta's --mgk-cta-blue (#1454B8) — so the same
   "Add to cart" action reads identically whether a shopper sees it on Home
   or clicks through to the full Flash Deals page. Mobile (≤640px) keeps its
   own --fm-blue below, untouched. */
.mgk-sale__herodeal-add { width: 100%; margin-top: 4px; background: #1363FF; border-color: #1363FF; padding: 14px 0; font-size: 16px; font-weight: 700; }
.mgk-sale__herodeal-add:hover { background: #0D3985; border-color: #0D3985; }
/* Stacked: photo on top, body under it. align-items goes back to stretch so both
   fill the card's width (in a column flex, stretch is the CROSS axis = width, so
   it no longer affects the photo's height the way it did on the desktop row).
   width:100% is explicit because flex-basis:auto in a column would otherwise size
   the media from its content — with aspect-ratio and an absolutely-positioned img
   inside, that content is zero-width. The 16/10 ratio still applies, so the photo
   stays landscape here too, just full-width. */
@media (max-width: 780px) { .mgk-sale__herodeal { flex-direction: column; align-items: stretch; } .mgk-sale__herodeal-media { flex-basis: auto; width: 100%; } }
/* No hero sale-tag override any more. This block existed to give the hero strip an
   aspect-ratio instead of the shared rule's fixed 40px: the hero is up to 2.5x wider
   than a grid card (537px at 1440, 682px at 780), so at 40px its box ratio hit 13.4
   and object-fit:cover kept only ~35% of the artwork, slicing "FREESHIP S$0" through
   the middle. It set 6.6 to match what the grid cards were getting.
   The shared rule is now aspect-ratio: var(--mgk-saletag-ratio, 4.69) for every card
   family, so the hero inherits a constant box ratio at every breakpoint — the thing
   this override was built to achieve — and at the artwork's own ratio rather than the
   6.6 that was still cropping ~28% off every card's height. Duplicating it here would
   only reintroduce that crop on the hero alone. */

/* Real urgency row (shared/sale-progress.php) — only rendered when the
   underlying stock/sold data is real and meaningful; see that partial's
   docblock for the exact "when to omit" rules. Bar fill = sold_24h /
   (sold_24h + stock_qty), rendered only when both numbers are real. */
.mgk-sale__progress { display: flex; flex-direction: column; gap: 6px; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--mgk-border); border-bottom: 1px solid var(--mgk-border); }
.mgk-sale__progress-bar { height: 6px; border-radius: 999px; background: var(--mgk-bg-alt); overflow: hidden; }
.mgk-sale__progress-fill { height: 100%; background: var(--mgk-amber); border-radius: 999px; }
.mgk-sale__progress-labels { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mgk-sale__progress-sold { color: var(--mgk-text-2); }
.mgk-sale__progress-left { color: var(--mgk-red); font-weight: 700; }
.mgk-sale__progress--sm { font-size: 11px; padding: 6px 0; gap: 4px; }
.mgk-sale__progress--sm .mgk-sale__progress-bar { height: 4px; }

/* max-width: none — see the note on .mgk-sale__filterbar-inner; all four Sale
   content columns go full-bleed together. */
.mgk-sale__grid { padding: 16px var(--mgk-pad-x) 24px; max-width: none; margin: 0; width: 100%; }
/* Card SIZE synced to Home's product rows (.mgk-products .mgk-grid): the same
   auto-fit + minmax(256px, 1fr) track, so a deal card measures the same as a
   Home/Category/Search product card at every viewport instead of stretching
   with .mgk-grid--5's five hard columns (which gave 265px @1440 but would give
   ~490px once the grid went full-bleed). Overrides .mgk-grid--5 (0,1,0) from
   this (0,1,0) selector by source order — it is defined later in the file.
   The <=960px / <=640px blocks below restate their own column counts. */
.mgk-sale__grid { grid-template-columns: repeat(auto-fit, minmax(256px, 1fr)); padding-left: 24px; padding-right: 24px; }
/* Grid deal cards now render via shared/prod-card.php (.mgk-prod), same as
   Featured/Shop; the old standalone .mgk-sale__deal* card markup/CSS is gone.
   Only the untouched Hero Deal still uses its own .mgk-sale__herodeal-* rules
   (styled further above) plus a few classes it shares with the old grid card
   family — .mgk-sale__deal-tag, -ph, -saletag — kept below/above for that
   reason even though the grid no longer renders them. */
.mgk-sale__deal-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
/* top-left, not bottom -- the merchant sale-tag image (.mgk-sale__deal-
   saletag below) always occupies the bottom strip of every Fresh Deals
   card now. */
.mgk-sale__deal-tag { position: absolute; top: 8px; left: 8px; background: var(--mgk-red); color: #fff; font-size: 12px; font-weight: 900; padding: 3px 8px; border-radius: 999px; z-index: 1; }
/* Merchant-uploaded Sale Campaign tag — full sizing rule shared with every
   other card family at .mgk-prod__saletag. The hero deal needs no override
   here: because the strip is a fixed height rather than a percentage, its
   ≥260px-tall media box gets the same 40px banner as the short grid cards
   right below it, which is exactly the point. The hero DOES carry
   .mgk-sale__herodeal-saletag in the markup so the ≤640px block can keep it
   at desktop thickness while the grid cards thin down. */
/* Out-of-stock CTA swap — same red-tint wishlist button style as
   .mgk-flashcard__wish / shared/prod-card.php's .mgk-prod__wish-wide. */
.mgk-sale__herodeal-wish { background: var(--mgk-red-bg); color: var(--mgk-red); }
.mgk-sale__herodeal-wish:hover { background: var(--mgk-red); color: #fff; }

@media (max-width: 960px) { .mgk-sale__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .mgk-sale__grid { grid-template-columns: repeat(2, 1fr); } }

/* Shared by the Sale/Fresh Deals and Seasonal Campaign pagination strips —
   same markup shape, identical styling, only the BEM block name differs. */
.mgk-sale__pagination, .mgk-seasoncamp__pagination { display: flex; justify-content: center; padding: 8px var(--mgk-pad-x) 40px; }
.mgk-sale__pagination ul, .mgk-seasoncamp__pagination ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mgk-sale__pagination a, .mgk-sale__pagination span.current, .mgk-sale__pagination span.dots,
.mgk-seasoncamp__pagination a, .mgk-seasoncamp__pagination span.current, .mgk-seasoncamp__pagination span.dots {
	display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px;
	border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--mgk-text-2); text-decoration: none;
}
.mgk-sale__pagination span.current, .mgk-seasoncamp__pagination span.current { background: var(--mgk-navy-900); color: #fff; }
.mgk-sale__pagination a:hover, .mgk-seasoncamp__pagination a:hover { background: var(--mgk-bg-alt); }

/* ── PROFILE ── */
/* Sidebar-nav layout (matches ui-retail S-020/dashboad.svg Profile spec):
   a fixed 256px account-nav column + a flexible main content column,
   side by side. Stacks to a single column on narrow viewports. */
/* Typography/colour match the ui-retail dashboad.css spec: every text node
   there is set in Quicksand (already loaded site-wide for ProdCard/Cart, see
   functions.php) at various weights, and body copy uses "primary_900"
   (#061937 — token --mgk-navy-900) rather than this file's default
   --mgk-text (#1B3A52), which is a different, darker-navy palette. */
.mgk-profile { display: block; font-family: 'Quicksand', var(--mgk-font); }
/* Sidebar (256px) + content (832px, matching the Privacy page's card width)
   + the 24px gap between them = 1112px — centre that whole block instead of
   letting it stretch across .mgk-section's full 1440px, which otherwise left
   every account page's content sitting flush against the sidebar with a huge
   dead gap on the right. */
.mgk-profile__layout { display: flex; align-items: flex-start; gap: 24px; max-width: 1112px; margin: 0 auto; }
.mgk-profile__nav { flex: 0 0 256px; display: flex; flex-direction: column; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); padding: 12px; gap: 2px; }
.mgk-profile__nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--mgk-navy-900); text-decoration: none; }
.mgk-profile__nav-item:hover { background: var(--mgk-bg-alt); }
.mgk-profile__nav-item.is-active { background: var(--mgk-sfa-bg, #E3F0FF); color: var(--mgk-blue, #1565C0); font-weight: 600; }
.mgk-profile__nav-item.is-active svg path { stroke: currentColor; }
.mgk-profile__nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; }
.mgk-profile__nav-icon svg { display: block; width: 16px; height: 16px; }
.mgk-profile__nav-item--signout { border-top: 1px solid var(--mgk-border-lt); margin-top: 4px; padding-top: 12px; }
.mgk-profile__nav-item[data-mgk-nav-disabled] { color: var(--mgk-text-3); cursor: not-allowed; }
@media (max-width: 900px) {
	.mgk-profile__layout { flex-direction: column; }
	.mgk-profile__nav { flex: 0 0 auto; width: 100%; flex-direction: row; flex-wrap: wrap; }
	.mgk-profile__nav-item--signout { border-top: none; margin-top: 0; padding-top: 10px; }
}
@media (max-width: 720px) {
	/* On account screens the header burger opens this account menu instead of
	   the storefront navigation. Keep it out of the content flow while closed,
	   then drop it below the fixed header in the two-column layout from the
	   mobile reference. */
	.mgk-profile__nav {
		display: none;
		position: fixed;
		top: 65px;
		left: 8px;
		right: 8px;
		z-index: 490;
		width: auto;
		padding: 10px;
		border-radius: 12px;
		background: #fff;
		box-shadow: 0 10px 28px rgba(6, 25, 55, .16);
	}
	body.admin-bar .mgk-profile__nav { top: 111px; }
	/* Phone app bar is two rows (114px, see the S-001 mobile block) rather than
	   the single ~61px row the 65px/111px offsets above assume — drop this fixed
	   panel below it so it doesn't open underneath the header. */
	@media (max-width: 640px) {
		.mgk-profile__nav { top: 118px; }
		body.admin-bar .mgk-profile__nav { top: 164px; } /* +46px WP mobile admin bar */
	}
	.mgk-profile__nav.is-mobile-open {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2px 4px;
	}
	.mgk-profile__nav-item {
		min-width: 0;
		padding: 9px 10px;
		gap: 8px;
		font-size: 12px;
		white-space: nowrap;
	}
	.mgk-profile__nav-item--signout {
		border-top: 0;
		margin-top: 0;
		padding-top: 9px;
	}
}
@media (max-width: 360px) {
	.mgk-profile__nav.is-mobile-open { grid-template-columns: 1fr; }
}
.mgk-profile__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
/* The identity block (avatar / name / contact / member-since) sits directly
   on the page — no card chrome around it, per the Profile design. Only the
   Personal Details card below it keeps its border. */
.mgk-profile__hero { background: transparent; border: none; border-radius: 0; padding: 0; display: flex; align-items: center; gap: 20px; }
.mgk-profile__avatar { width: 64px; height: 64px; border-radius: 50%; background: #E8F3FF; color: #1363FF; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
body .mgk-profile__avatar--photo { object-fit: cover; object-position: center; }
.mgk-profile__hero-body { display: flex; flex-direction: column; gap: 4px; }
.mgk-profile__hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mgk-profile__name { font-size: 22px; font-weight: 600; color: #1A2630; margin: 0; }
.mgk-profile__contact { font-size: 15px; color: rgba(26,38,48,.8); margin: 0; }
.mgk-profile__member { font-size: 13px; color: rgba(26,38,48,.8); margin: 0; }
.mgk-profile__tier { font-weight: 600; }
/* Sticky footer: Profile's content is short enough to leave the footer
   floating mid-screen on a tall viewport. Elementor's canvas template puts
   each widget in its own .e-con directly under .elementor, so making that
   wrapper a full-height flex column and pushing the footer's own container
   down with margin:auto pins the footer to the bottom — without it ever
   overlapping content on a short viewport (unlike position:fixed).
   Scoped by :has() to pages that actually carry the profile widget, so no
   other page's spacing changes. Also covers the other short account/order
   pages (Order Tracking, Order History, Account hub, Account Settings).
   min-height is 100vh minus body's own 71px padding-top (line 182, which
   already reserves room for the fixed .mgk-header) — using a bare 100vh
   here would double-count that offset and leave a 71px gap of empty
   scroll below the viewport before the footer ever comes into view.
   --mgk-abar below adds the logged-in WP admin bar's own height on top,
   since that bar sits above body (outside its padding-top) and shrinks
   the actual space body has to fill by that much again; same 32px/46px
   split WordPress core itself uses (see body.admin-bar .mgk-header, line
   185-186). */
.elementor:has([data-widget_type="mgk_profile.default"]),
.elementor:has([data-widget_type="mgk_address_book.default"]),
.elementor:has([data-widget_type="mgk_payment_method.default"]),
.elementor:has([data-widget_type="mgk_password.default"]),
.elementor:has([data-widget_type="mgk_privacy.default"]),
.elementor:has([data-widget_type="mgk_cart.default"]),
.elementor:has([data-widget_type="mgk_order_tracking.default"]),
.elementor:has([data-widget_type="mgk_order_history.default"]),
.elementor:has([data-widget_type="mgk_account.default"]),
.elementor:has([data-widget_type="mgk_account_settings.default"]) { display: flex; flex-direction: column; min-height: calc(100vh - 71px - var(--mgk-abar, 0px)); }
body.admin-bar { --mgk-abar: 32px; }
@media (max-width: 782px) { body.admin-bar { --mgk-abar: 46px; } }
.elementor:has([data-widget_type="mgk_profile.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_address_book.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_payment_method.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_password.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_privacy.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_cart.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_order_tracking.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_order_history.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_account.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]),
.elementor:has([data-widget_type="mgk_account_settings.default"]) > .e-con:has([data-widget_type="mgk_footer.default"]) { margin-top: auto; }
.mgk-profile__details-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mgk-profile__details-title { font-size: 16px; font-weight: 700; color: var(--mgk-navy-900); margin: 0; }
.mgk-profile__save-row { display: flex; gap: 12px; margin-top: 20px; }
.mgk-profile__save-row[hidden] { display: none; }
.mgk-profile__save-row .mgk-btn--outline { background: #fff; color: #1363FF; border-color: #1363FF; }
.mgk-profile__save-row .mgk-btn--blue { background: #1363FF; border-color: #1363FF; }

/* Privacy & Notification (privacy.svg/css spec) — Notifications card (4 rows
   with a switch each) + Privacy & data (PDPA) card (Cookie preferences /
   Delete account, each row ending in a button instead of a switch). */
.mgk-privacy { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0 0 24px; gap: 20px; }
.mgk-privacy__title { font-family: 'Quicksand', var(--mgk-font); font-size: 20px; line-height: 28px; font-weight: 700; color: #1B3A52; margin: 0; align-self: stretch; }
.mgk-privacy__card { display: flex; flex-direction: column; box-sizing: border-box; width: 100%; border: 1px solid #D5E2EE; border-radius: var(--mgk-radius); padding: 20px; gap: 0; }
.mgk-privacy__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid #DCE5EA; }
.mgk-privacy__card .mgk-privacy__row:first-child { padding-top: 0; }
.mgk-privacy__card .mgk-privacy__row:last-child { border-bottom: none; padding-bottom: 0; }
.mgk-privacy__row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.mgk-privacy__row-title { font-family: 'Quicksand', var(--mgk-font); font-size: 18px; line-height: 28px; font-weight: 600; color: #1A2E0E; margin: 0; }
.mgk-privacy__row-title--danger { color: #F53F3F; }
.mgk-privacy__row-desc { font-family: 'Quicksand', var(--mgk-font); font-size: 12px; line-height: 16px; font-weight: 500; color: #717182; margin: 0; }
.mgk-privacy__toggle { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; width: 36px; height: 20px; border-radius: 999px; background: var(--mgk-border); cursor: pointer; transition: background .15s; }
/* The PDPA footnote is PHONE-only (mockup line 3437). Desktop says the same
   thing through its section heading and each row's own description, so it
   would be a third copy there. § 306 shows it back at ≤640px. */
.mgk-privacy__note { display: none; }
/* The Account card-picker sheet is PHONE-only: above 640px "Payment methods"
   navigates to /payment-method/, which is the desktop screen, so the sheet
   must never render there. § 313 turns it on at ≤640px. */
.mgk-cardsheet { display: none; }
/* Phone-only reassurance line in the add-card sheet (mockup line 3687). */
.mgk-card-form__note { display: none; }
/* Phone-only text glyph for the account menu tiles (mockup line 4312-4319).
   Desktop keeps its SVG icons; § 312 flips these two at ≤640px. */
.mgk-acct__row-glyph { display: none; }

/* Terms of Service summary (shared/terms-sheet.php). Centred dialog on desktop,
   bottom sheet at ≤640px (§ 316). Same z-index band as the PDPA modal so the two
   sit above the cookie bar and the card sheet. */
.mgk-termsheet { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-termsheet[hidden] { display: none; }
.mgk-termsheet__backdrop { position: absolute; inset: 0; background: rgba(27,58,82,.55); backdrop-filter: blur(2px); }
.mgk-termsheet__card { position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; background: var(--mgk-surface); border-radius: 20px; box-shadow: var(--mgk-shadow-lg); }
.mgk-termsheet__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px 8px; }
.mgk-termsheet__title { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-termsheet__x { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--mgk-bg-alt); color: var(--mgk-text-2); font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mgk-termsheet__x:hover { background: var(--mgk-border); }
.mgk-termsheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 28px 24px; }
.mgk-termsheet__p { font-size: 14px; line-height: 1.65; color: var(--mgk-text-2); margin: 10px 0 0; }
.mgk-privacy__toggle.is-on { background: #1363FF; }
.mgk-privacy__knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.mgk-privacy__toggle.is-on .mgk-privacy__knob { left: 18px; }
.mgk-privacy__btn { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 3px 16px; font-family: 'Quicksand', var(--mgk-font); font-size: 14px; line-height: 22px; font-weight: 400; border-radius: 6px; background: #fff; }
.mgk-privacy__btn--blue { border: 1px solid #1363FF; color: #1363FF; }
.mgk-privacy__btn--red { border: 1px solid #CB272D; color: #CB272D; }
@media (max-width: 640px) {
	.mgk-privacy__row { flex-wrap: wrap; }
}

/* ── Date of Birth field + calendar panel ───────────────────────────────────
   The native picker cannot be themed in ANY browser, and Firefox's calendar
   button cannot even be hidden (verified in Firefox 152: no
   ::-moz-calendar-picker-indicator, ::-webkit-* rules parsed but ignored,
   `appearance: none` ineffective, paints in the top layer so an overlay can't
   cover it, and it anchors to the visible box so clipping can't move it).

   So the real <input type="date"> is never painted — it only holds the
   name/value the form posts — and the visible field is a text proxy plus the
   custom .mgk-cal panel below, both fully ours to style. */
.mgk-profile__field-datewrap { position: relative; display: block; }
/* Real input stays in the layout and focusable, just invisible and zero-size:
   NOT display:none, so it still participates in form submission the same way. */
[data-mgk-profile-mode] .mgk-profile__field-datewrap .mgk-profile__field-input--date {
	position: absolute; left: 12px; bottom: 0; width: 1px; height: 1px;
	padding: 0; border: 0; opacity: 0; pointer-events: none;
}
.mgk-profile__field-dateicon { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: inline-flex; cursor: pointer; }
.mgk-profile__field-dateicon svg { display: block; width: 18px; height: 18px; }

/* Calendar panel (design comp). Anchored under the field rather than a centred
   modal, so it reads as a picker for this input. */
.mgk-cal {
	position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
	display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
	width: 403px; max-width: calc(100vw - 32px); padding: 20px;
	background: #fff; border-radius: 16px;
	box-shadow: 0 12px 32px rgba(6,25,55,.16), 0 0 0 1px rgba(6,25,55,.06);
	font-family: 'Quicksand', var(--mgk-font);
}
.mgk-cal[hidden] { display: none; }
/* Right-align when the field sits near the viewport's right edge (JS sets this). */
.mgk-cal.is-mgk-cal-right { left: auto; right: 0; }
.mgk-cal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
/* Title doubles as the button into the month/year view, so it is a <button>
   reset back to plain text (the comp shows no button chrome on it). */
.mgk-cal__title { flex: 1 1 auto; padding: 0; border: 0; background: transparent; font-family: inherit; font-size: 20px; line-height: 25px; font-weight: 700; color: #1363FF; text-align: center; cursor: pointer; }
.mgk-cal__close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 16px; background: #F6F8FB; cursor: pointer; }
.mgk-cal__close svg { display: block; width: 20px; height: 20px; }

/* ── Month/year view ───────────────────────────────────────────────────────
   Same panel, different head layout: the comp puts the close button alone on a
   right-aligned row, with a prev-year / 2026 / next-year row beneath it. So in
   this view the head wraps and the year nav takes a full row of its own. */
.mgk-cal__year { display: none; }
.mgk-cal__months { display: none; }
.mgk-cal[data-mgk-cal-view="months"] { width: 386px; }
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__head { flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
/* Title/day-grid/weekday-header belong to the day view only. */
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__title,
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__dow,
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__grid { display: none; }
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__year { order: 2; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 25px; }
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__close { order: 1; }
.mgk-cal[data-mgk-cal-view="months"] .mgk-cal__months { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 8px; row-gap: 4px; }
.mgk-cal__yearlabel { flex: 1 1 auto; font-size: 20px; line-height: 25px; font-weight: 700; color: #1363FF; text-align: center; }
/* Chevrons: one SVG, flipped for "next". Disabled (at the min/max year) greys
   out to #A0B8C2 exactly as the comp's right-hand arrow does. */
.mgk-cal__nav { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 24px; padding: 0; border: 0; background: transparent; color: #002D42; cursor: pointer; }
.mgk-cal__nav svg { display: block; width: 12px; height: 24px; }
.mgk-cal__nav--next { transform: rotate(180deg); }
.mgk-cal__nav[disabled] { color: #A0B8C2; cursor: not-allowed; }
.mgk-cal__month {
	display: flex; align-items: center; justify-content: center;
	height: 45px; padding: 8px; border: 0; border-radius: 12px; background: transparent;
	font-family: inherit; font-size: 20px; line-height: 25px; font-weight: 500;
	color: #061937; cursor: pointer; white-space: nowrap;
}
.mgk-cal__month:hover:not([disabled]) { background: #F6F8FB; }
.mgk-cal__month[disabled] { color: #A9B6C8; cursor: not-allowed; }
.mgk-cal__month.is-sel { background: #E8F3FF; color: #1363FF; font-weight: 600; }
.mgk-cal__body { display: flex; flex-direction: column; gap: 12px; width: 100%; }
/* Weekday header and day rows share one 7-track grid so columns line up. */
.mgk-cal__dow,
.mgk-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.mgk-cal__dow > span { font-size: 20px; line-height: 25px; font-weight: 600; color: #061937; text-align: center; }
/* Rows sit 4px apart (comp) while columns keep the 8px gap above. */
.mgk-cal__grid { row-gap: 4px; }
.mgk-cal__day {
	display: flex; align-items: center; justify-content: center;
	height: 45px; padding: 8px; border: 0; border-radius: 12px; background: transparent;
	font-family: inherit; font-size: 20px; line-height: 25px; font-weight: 500;
	color: #061937; cursor: pointer;
}
.mgk-cal__day--pad { visibility: hidden; cursor: default; }
.mgk-cal__day:hover:not(.mgk-cal__day--pad):not([disabled]) { background: #F6F8FB; }
.mgk-cal__day[disabled] { color: #A9B6C8; cursor: not-allowed; }
.mgk-cal__day.is-sel { background: #E8F3FF; color: #1363FF; font-weight: 600; }
@media (max-width: 460px) {
	/* Cells shrink with the panel; 20px type would otherwise overflow 7 columns. */
	.mgk-cal { width: auto; left: 0; right: 0; padding: 16px; gap: 12px; }
	.mgk-cal__dow > span,
	.mgk-cal__day { font-size: 16px; }
	.mgk-cal__day { height: 38px; padding: 4px; }
	.mgk-cal__dow, .mgk-cal__grid { gap: 4px; }
	/* "September"/"November" at 20px overflow a third of a narrow panel. */
	.mgk-cal[data-mgk-cal-view="months"] { width: auto; }
	.mgk-cal__month { height: 40px; padding: 4px; font-size: 15px; }
}

/* View/Edit mode: [data-mgk-profile-mode] on the section drives which of the
   parallel view-text/edit-input pairs are visible. Edit affordances (avatar
   photo badge, address +/− and Default radio) are also gated by the same
   attribute, on top of their own [hidden] toggled by JS, so nothing needs a
   second data attribute per element. The "Default" chip itself (as opposed
   to the radio used to change it) is a plain readout and stays visible in
   both modes so a shopper can tell which address is default without
   entering Edit. */
.mgk-profile__field-value { font-size: 14px; color: var(--mgk-navy-900); }
/* The date field's wrapper follows its input: it carries the absolutely
   positioned calendar icon, so leaving it visible in view mode left that icon
   floating in the middle of the card with no input under it. */
.mgk-profile__field-input,
.mgk-profile__field-datewrap,
.mgk-profile__addr-label,
[data-mgk-profile-mode="view"] .mgk-profile__addr-default,
[data-mgk-profile-mode="view"] .mgk-profile__addr-remove { display: none; }
.mgk-profile__addr-default-chip[hidden] { display: none; }
[data-mgk-profile-mode="edit"] .mgk-profile__field-value,
[data-mgk-profile-mode="edit"] .mgk-profile__addr-view-label,
[data-mgk-profile-mode="edit"] .mgk-profile__addr-recipient { display: none; }
[data-mgk-profile-mode="edit"] .mgk-profile__field-input,
[data-mgk-profile-mode="edit"] .mgk-profile__field-datewrap,
[data-mgk-profile-mode="edit"] .mgk-profile__addr-label { display: block; }
.mgk-profile__fields { gap: 16px; }
.mgk-profile__field { display: flex; flex-direction: column; gap: 4px; }
.mgk-profile__field-label { font-size: 14px; font-weight: 600; color: var(--mgk-navy-900); }
.mgk-profile__field-input { font-size: 14px; font-weight: 400; color: var(--mgk-navy-900); padding: 8px 12px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm, 8px); background: var(--mgk-surface); width: 100%; font-family: inherit; }
.mgk-profile__field-input:focus { outline: none; border-color: var(--mgk-teal); box-shadow: 0 0 0 3px rgba(20,150,130,.12); }
/* Base/inert state — view mode at any width, where the input itself is
   hidden anyway (view mode has its own "+65 ..." readout instead, via
   [data-mgk-phone-value] below). Edit mode (desktop/tablet always; mobile
   after tapping "Edit") turns the chip on via the rule right after this one;
   the ≤640px block further down re-styles that same chip to match its own
   "Edit personal details" card mockup colours instead of these defaults. */
.mgk-profile__phone-row { display: contents; }
.mgk-profile__phone-prefix { display: none; }
/* Edit mode, all widths: the row takes over the input's own box styling
   (border/background/radius) so the "+65" chip and the digits read as one
   continuous field. mgk_profile_data()'s label no longer carries "(+65)" at
   any width, so this chip is what supplies that cue everywhere now — the
   ≤640px block below overrides these colours to match its own mockup. */
[data-mgk-profile-mode="edit"] .mgk-profile__phone-row {
	display: flex; align-items: center; gap: 6px;
	border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm, 8px);
	background: var(--mgk-surface); padding-left: 12px;
}
[data-mgk-profile-mode="edit"] .mgk-profile__phone-row .mgk-profile__field-input {
	border: none; background: transparent; padding-left: 0;
	flex: 1 1 auto; width: auto; min-width: 0;
}
[data-mgk-profile-mode="edit"] .mgk-profile__phone-row .mgk-profile__field-input:focus {
	outline: none; border-color: transparent; box-shadow: none;
}
[data-mgk-profile-mode="edit"] .mgk-profile__phone-row:focus-within {
	border-color: var(--mgk-teal); box-shadow: 0 0 0 3px rgba(20,150,130,.12);
}
[data-mgk-profile-mode="edit"] .mgk-profile__phone-prefix {
	display: inline-flex; flex: 0 0 auto; font-size: 14px; color: var(--mgk-text-2, #667085);
}
/* Room for the overlaid calendar icon. Declared HERE, after the shared
   .mgk-profile__field-input rule above, because that one sets `padding` as a
   shorthand — at equal specificity it would otherwise reset padding-right back
   to 12px and let the date text run under the icon.
   Only the proxy needs it now — the real date input is the invisible 1px box. */
.mgk-profile__field-dateproxy { padding-right: 36px; }
/* Focus colour matches the calendar panel's accent (#1363FF) rather than the
   form's default teal ring, so field and panel read as one control. Applies to
   the proxy, which is the field the shopper actually focuses. */
.mgk-profile__field-dateproxy:focus { border-color: var(--mgk-sfa); box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
/* Native <select> arrow sits flush against the right edge by default —
   redraw it so it lines up with the date field's 10px-inset calendar icon. */
select.mgk-profile__field-input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-repeat: no-repeat; background-position: right 10px center; background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23292D32' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Hand-rolled address/postal-code autocomplete dropdown (replaces native
   <datalist> — Firefox won't reopen a <datalist> popup when its <option>s
   are rewritten by JS while the field still has focus, so live-search
   suggestions there silently never appear). Anchored under the input via
   the field wrapper's position:relative. */
.mgk-profile__field--autocomplete,
.mgk-field--autocomplete { position: relative; }
.mgk-autocomplete { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; z-index: 20; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm, 8px); box-shadow: var(--mgk-shadow-lg); max-height: 420px; overflow-y: auto; }
.mgk-autocomplete[hidden] { display: none; }
.mgk-autocomplete__item { display: block; width: 100%; text-align: left; padding: 8px 10px; font-size: 14px; color: var(--mgk-text); background: none; border: none; cursor: pointer; font-family: inherit; }
.mgk-autocomplete__item:hover,
.mgk-autocomplete__item.is-active { background: var(--mgk-bg-alt); }
.mgk-autocomplete__item--viewall { display: block; color: var(--mgk-teal); font-weight: 600; text-decoration: none; padding: 10px; border-top: 1px solid var(--mgk-border-lt); }
/* Suggestion cards reuse the real ProdCard Figma spec AT ITS EXACT FIXED
   SIZE (260x376 — see .mgk-prod--suggest below) instead of the theme's own
   fluid .mgk-prod (which stretches to fill its grid track). A `260px` fixed
   track (not `minmax(260px, 1fr)`) means auto-fill only ever changes the
   COLUMN COUNT to fit the viewport — it never stretches an existing card
   past 260px to fill leftover row space. */
.mgk-autocomplete--search { width: 100%; max-width: none; padding: 16px; display: none; grid-template-columns: repeat(auto-fill, 260px); gap: 16px; max-height: 80vh; }
.mgk-autocomplete--search:not([hidden]) { display: grid; }
.mgk-autocomplete--search .mgk-autocomplete__item--viewall { grid-column: 1 / -1; }
/* white-space: normal override: the header search dropdown lives inside
   .mgk-header__pill (line ~209), which sets white-space:nowrap for its own
   pill-button text — an inheritable property, so without this every
   descendant text (including this card's name) inherits nowrap and never
   wraps to the line-clamp's 2 lines. */
/* Exact ProdCard Figma frame (260x376, "ProdCard" spec) — fixed, not fluid
   like the theme's own .mgk-prod, so every suggestion card is identically
   sized regardless of how many tracks fit the dropdown's current width.
   Every measurement below (media 258x176, body 258x198, name 234x35,
   price/add-to-cart row 234x40) is taken straight from that spec so the
   fixed-height card never overflows and clips its own Add-to-cart button —
   this is why `overflow` stays hidden and why subtitle/options rows (not
   part of the Figma frame) are capped to fit rather than pushing height. */
.mgk-prod--suggest { width: 260px; height: 376px; flex: none; overflow: hidden; }
.mgk-prod--suggest .mgk-prod__media { width: 258px; margin: 0 auto; flex: none; }
.mgk-prod--suggest .mgk-prod__body { width: 258px; padding: 8px 12px 12px; gap: 8px; }
.mgk-prod--suggest .mgk-prod__badges { min-height: 24px; white-space: normal; }
.mgk-prod--suggest .mgk-prod__name { font-family: 'Inter', var(--mgk-font); font-size: 16px; font-weight: 500; line-height: 18px; min-height: 35px; color: #1B3A52; white-space: normal; }
.mgk-prod--suggest .mgk-prod__foot { flex-direction: column; align-items: stretch; gap: 8px; }
.mgk-prod--suggest .mgk-prod__price { display: flex; align-items: baseline; gap: 8px; }
.mgk-prod--suggest .mgk-prod__actions { display: none; }
.mgk-prod--suggest .mgk-prod__add-wide { margin-top: 0; height: 40px; }
.mgk-prod--suggest .mgk-prod__suggest-cat,
.mgk-prod--suggest .mgk-prod__options { display: none; }

/* Header search — two-column dropdown: query-matching terms + category
   shortcuts on the left, a row of matching products on the right. Wider
   than the plain .mgk-autocomplete list because the header search box has
   room to show both at a glance instead of making the shopper pick a
   suggestion just to see if it has results. */
.mgk-header-suggest { position: fixed; top: var(--mgk-suggest-top, 100%); left: var(--mgk-suggest-left, 24px); right: var(--mgk-suggest-right, 24px); z-index: 30; display: flex; gap: 28px; align-items: stretch; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-top: none; border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; box-shadow: var(--mgk-shadow-lg); padding: 24px 26px 26px; width: auto; max-width: none; }
.mgk-header-suggest[hidden] { display: none; }
.mgk-header-suggest__col--terms { flex: 0 0 280px; padding: 0; border-right: none; display: flex; flex-direction: column; gap: 16px; }
/* auto-fill with a fixed 260px track (the ProdCard frame's own width, see
   .mgk-prod--suggest) rather than a hard N-column grid or a `1fr` track:
   cards stay pinned at their exact Figma size, the endpoint's up-to-5
   results just wrap onto a second row on a narrower viewport instead of
   every card stretching or shrinking to fit. */
.mgk-header-suggest__col--products { flex: 1 1 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, 260px); gap: 20px; min-width: 0; max-height: 80vh; overflow-y: auto; }
.mgk-header-suggest__term { display: block; padding: 0; border-radius: 6px; font-size: 15px; color: var(--mgk-navy-900); text-decoration: none; }
.mgk-header-suggest__term:hover { text-decoration: underline; }
.mgk-header-suggest__term strong { font-weight: 700; color: var(--mgk-navy-900); }
.mgk-header-suggest__cats { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--mgk-border-lt); display: flex; flex-direction: column; gap: 10px; }
.mgk-header-suggest__cat { display: flex; align-items: center; gap: 10px; padding: 0; border-radius: 0; font-size: 15px; font-weight: 600; color: var(--mgk-link-blue, #1454B8); text-decoration: underline; }
.mgk-header-suggest__cat:hover { color: var(--mgk-teal); }
.mgk-header-suggest__cat-icon { font-size: 13px; line-height: 1; }
/* Products render as real .mgk-prod cards (see .mgk-prod--suggest above),
   just laid out in this column's 5-track grid instead of a flat row. */
@media (max-width: 700px) {
	.mgk-header-suggest { flex-direction: column; border-radius: 18px; border-top: 1px solid var(--mgk-border); gap: 16px; }
	.mgk-header-suggest__col--terms { flex: none; border-right: none; border-bottom: 1px solid var(--mgk-border-lt); padding-bottom: 12px; }
	.mgk-header-suggest__col--products { flex: none; }
}

/* Avatar photo button: hidden until edit mode (JS toggles [hidden]; the
   attribute must beat .mgk-btn-style buttons' display, so this rule mirrors
   the same [hidden] guard used across the theme). */
.mgk-profile__avatar-wrap { position: relative; flex-shrink: 0; }
.mgk-profile__avatar-edit[hidden] { display: none; }
.mgk-profile__avatar-edit { position: absolute; bottom: -4px; right: -4px; width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--mgk-red); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--mgk-shadow); }
.mgk-profile__avatar-edit:hover { opacity: .9; }

/* Address book (Profile): multiple entries with add/remove + a single default. */
.mgk-profile__addr-add[hidden] { display: none; }
.mgk-profile__addr-add { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-teal); font-size: 20px; line-height: 1; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
.mgk-profile__addr-add:hover { border-color: var(--mgk-teal); background: rgba(20,150,130,.06); }
[data-mgk-profile-mode="edit"] .mgk-profile__addr-add { display: flex; }
.mgk-profile__addr-empty { font-size: 14px; color: var(--mgk-text-3); margin: 0; }
.mgk-profile__addr-empty[hidden] { display: none; }
.mgk-profile__addr-list { display: flex; flex-direction: column; gap: 18px; }
.mgk-profile__addr { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px dashed var(--mgk-border); }
.mgk-profile__addr:first-child { padding-top: 0; border-top: none; }
.mgk-profile__addr-top { display: flex; align-items: center; gap: 10px; }
.mgk-profile__addr-view-label { flex: 1; font-size: 15px; font-weight: 700; color: var(--mgk-text); }
.mgk-profile__addr-default-chip { flex-shrink: 0; text-transform: none; }
.mgk-profile__addr-recipient { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--mgk-text); }
.mgk-profile__addr-recipient[hidden] { display: none; }
.mgk-profile__addr-recipient-sep { color: var(--mgk-border); font-weight: 400; }
.mgk-profile__addr-label { flex: 1; font-size: 14px; color: var(--mgk-text); padding: 8px 10px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm, 8px); background: var(--mgk-surface); font-family: inherit; }
.mgk-profile__addr-label:focus { outline: none; border-color: var(--mgk-teal); box-shadow: 0 0 0 3px rgba(20,150,130,.12); }
[data-mgk-profile-mode="edit"] .mgk-profile__addr-remove { display: flex; }
.mgk-profile__addr-remove { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text-2); font-size: 20px; line-height: 1; cursor: pointer; flex-shrink: 0; align-items: center; justify-content: center; }
.mgk-profile__addr-remove:hover { border-color: var(--mgk-red); color: var(--mgk-red); }
[data-mgk-profile-mode="edit"] .mgk-profile__addr-default { display: inline-flex; }
.mgk-profile__addr-default { align-items: center; gap: 8px; cursor: pointer; width: fit-content; font-size: 13px; color: var(--mgk-text-2); }
.mgk-profile__addr-default input { accent-color: var(--mgk-teal); width: 16px; height: 16px; cursor: pointer; }
.mgk-profile__addr-grid { gap: 16px; }
[data-mgk-profile-mode="view"] .mgk-profile__addr-grid--recipient { display: none; }
/* Invalid postal code (profileValidateAddresses() in mgk-retail.js, mirroring
   mgk_core_valid_sg_postal() server-side) — flags the field red until fixed. */
.mgk-profile__field-input.is-invalid { border-color: var(--mgk-red); }
.mgk-profile__field-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(232,80,64,.12); }
/* Date of birth: message under the field when the typed dd/mm/yyyy doesn't
   parse or falls in the future (mgkDobParse() in mgk-retail.js). Phone's own
   spec redeclares this at its exact mockup colour further down. */
.mgk-profile__field-err { margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--mgk-red); }
.mgk-profile__field-err[hidden] { display: none; }

/* Live delivery-zone lookup under the postal input (mgk_zone_check AJAX,
   same endpoint checkout's own "Check Zone" uses) — [hidden] until 6 digits
   are entered, then green (zone matched, methods listed) or red (postal
   code isn't in any configured shipping zone). */
.mgk-profile__addr-zone { font-size: 12px; font-weight: 600; margin-top: 6px; }
.mgk-profile__addr-zone[hidden] { display: none; }
.mgk-profile__addr-zone.is-ok { color: var(--mgk-green); }
.mgk-profile__addr-zone.is-err { color: var(--mgk-red); }
.mgk-profile__addr-zone-methods { display: block; font-weight: 400; color: var(--mgk-text-2); margin-top: 2px; }

/* Language selector — display-only card, always visible in both modes. */
.mgk-profile__lang-opts { gap: 14px; }
.mgk-profile__lang-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border: 1.5px solid var(--mgk-border); border-radius: var(--mgk-radius-sm, 8px); background: var(--mgk-surface); cursor: pointer; font-family: inherit; }
.mgk-profile__lang-opt.is-active { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }
.mgk-profile__lang-flag { font-size: 22px; }
.mgk-profile__lang-name { font-size: 14px; font-weight: 700; color: var(--mgk-text); }
.mgk-profile__lang-native { font-size: 12px; color: var(--mgk-text-3); }

.mgk-profile__pref-list { display: flex; flex-direction: column; gap: 12px; }
.mgk-profile__pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mgk-profile__pref-label { font-size: 14px; color: var(--mgk-text-2); }
.mgk-profile__toggle { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--mgk-border); flex-shrink: 0; transition: background-color .15s ease; border: none; padding: 0; cursor: pointer; }
.mgk-profile__toggle.is-on { background: var(--mgk-green); }
.mgk-profile__toggle-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--mgk-shadow); transition: left .15s ease; }
.mgk-profile__toggle.is-on .mgk-profile__toggle-knob { left: 22px; }
.mgk-profile__prefs-cta { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--mgk-teal); text-decoration: none; }
.mgk-profile__prefs-cta:hover { text-decoration: underline; }
.mgk-profile__actions-row { display: flex; flex-wrap: wrap; gap: 24px; }
.mgk-profile__pw,
.mgk-profile__delete,
.mgk-profile__logout { background: none; border: none; padding: 0; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; }
.mgk-profile__pw { color: var(--mgk-teal); }
.mgk-profile__delete { color: var(--mgk-red); }
.mgk-profile__logout { color: var(--mgk-text); }
.mgk-profile__profile-view { display: flex; flex-direction: column; gap: 20px; }
.mgk-profile__profile-view[hidden] { display: none; }
.mgk-profile__pwpanel { display: flex; flex-direction: column; gap: 18px; min-height: 374px; padding: 24px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius); background: var(--mgk-surface); }
.mgk-profile__pwpanel[hidden] { display: none; }
.mgk-profile__pw-title { margin: 0 0 22px; color: var(--mgk-navy-900); font-size: 18px; font-weight: 700; line-height: 1.3; }
/* Distinct from .mgk-profile__field-input, which is hidden outside the
   Personal Details view/edit toggle (line ~1881) — this panel has no such
   mode, so reusing that class would keep the input permanently display:none. */
.mgk-profile__pw-input { min-height: 40px; font-size: 14px; color: var(--mgk-text); padding: 9px 12px; border: 1px solid #D5E2EF; border-radius: 8px; background: var(--mgk-surface); width: 100%; font-family: inherit; }
/* Both come from the PHONE design (§ 304): the mockup shows a helper line under
   "New password" and a "Forgot your current password?" link under the button.
   Desktop's password card is a plain 3-field form and gains nothing from
   either, so they are phone-only. */
.mgk-profile__pw-help { display: none; }
.mgk-profile__pw-forgot { display: none; }
.mgk-profile__pw-input:focus { outline: none; border-color: #165DFF; box-shadow: 0 0 0 3px rgba(22,93,255,.10); }
.mgk-profile__pw-input.is-invalid { border-color: var(--mgk-red); }
.mgk-profile__pw-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(232,80,64,.12); }
.mgk-profile__pwpanel .mgk-profile__actions-row { margin-top: 2px; }
.mgk-profile__pwpanel [data-mgk-pw-save] { min-width: 144px; background: #165DFF; border-color: #165DFF; }
.mgk-profile__pwpanel [data-mgk-pw-save]:disabled { background: #C9CED6; border-color: #C9CED6; color: #667085; cursor: not-allowed; opacity: 1; }
.mgk-profile__pw-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 18px; border: 1.5px solid; border-radius: 12px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.mgk-profile__pw-status[hidden] { display: none; }
.mgk-profile__pw-status.is-ok { color: #00A63A; background: #E8FBEA; border-color: #00C33C; }
.mgk-profile__pw-status.is-err { color: #D52E32; background: #FFF0EE; border-color: #FF3B3F; }
.mgk-profile__pw-status-close { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: currentColor; font-family: 'Quicksand', var(--mgk-font); font-size: 32px; font-weight: 300; line-height: 1; cursor: pointer; }
.mgk-profile__pw-status-close:hover { opacity: .7; }
@media (max-width: 600px) {
	.mgk-profile__pwpanel { min-height: 0; padding: 20px 16px; }
	.mgk-profile__pw-title { margin-bottom: 10px; }
	.mgk-profile__pwpanel [data-mgk-pw-save] { width: 100%; }
	.mgk-profile__pw-status { padding: 13px 14px; font-size: 15px; }
}
.mgk-profile__pw:hover,
.mgk-profile__delete:hover,
.mgk-profile__logout:hover { text-decoration: underline; }

/* ── VOUCHERS ── */
.mgk-vouch { display: flex; flex-direction: column; gap: 20px; }
.mgk-vouch__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mgk-vouch__heading { font-size: 20px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-vouch__redeem-form { display: flex; gap: 8px; }
.mgk-vouch__redeem-input { flex: 1; min-width: 0; border: 1px solid var(--mgk-border); background: var(--mgk-surface); color: var(--mgk-text); border-radius: var(--mgk-radius-sm); padding: 10px 12px; font-size: 14px; font-family: inherit; }
.mgk-vouch__redeem-input:focus { outline: none; border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-vouch__redeem-note { font-size: 12px; color: var(--mgk-text-3); margin: 8px 0 0; }
.mgk-vouch__tabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1px solid var(--mgk-border); }
.mgk-vouch__tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--mgk-text-2); font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 20px; cursor: pointer; text-transform: capitalize; }
.mgk-vouch__tab.is-active { color: var(--mgk-navy); border-bottom-color: var(--mgk-navy); }
.mgk-vouch__panel { display: flex; flex-direction: column; gap: 12px; }
.mgk-vouch__panel[hidden] { display: none; }
.mgk-vouch__card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mgk-vouch__card--green   { background: var(--mgk-green-bg);   border-color: rgba(34,168,107,.2); }
.mgk-vouch__card--sfa     { background: var(--mgk-sfa-bg);     border-color: rgba(21,101,192,.2); }
.mgk-vouch__card--halal   { background: var(--mgk-halal-bg);   border-color: rgba(22,135,90,.2); }
.mgk-vouch__card--default { background: var(--mgk-bg-alt); }
.mgk-vouch__card-left { display: flex; align-items: center; gap: 16px; }
.mgk-vouch__coupon { width: 80px; height: 64px; border: 2px dashed var(--mgk-border); border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex-shrink: 0; }
.mgk-vouch__coupon-code { font-size: 12px; font-weight: 900; color: var(--mgk-navy); }
.mgk-vouch__coupon-tag { font-size: 12px; font-weight: 700; color: var(--mgk-red); }
.mgk-vouch__desc { font-size: 15px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-vouch__min { font-size: 13px; color: var(--mgk-text-2); margin: 2px 0 0; }
.mgk-vouch__expiry { font-size: 12px; color: var(--mgk-text-3); margin: 2px 0 0; }
.mgk-vouch__code { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--mgk-radius-sm); background: var(--mgk-surface); color: var(--mgk-navy); border: 1px solid var(--mgk-border); }
.mgk-vouch__empty { font-size: 14px; color: var(--mgk-text-3); padding: 16px 0; margin: 0; }
.mgk-vouch__earn-grid { gap: 12px; }
.mgk-vouch__earn-item { background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mgk-vouch__earn-icon { font-size: 24px; }
.mgk-vouch__earn-name { font-size: 14px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-vouch__earn-desc { font-size: 12px; color: var(--mgk-text-2); margin: 0; }

@media (max-width: 860px) {
	.mgk-profile__hero { flex-direction: column; align-items: flex-start; }
	.mgk-vouch__card { flex-direction: column; align-items: flex-start; }
	.mgk-vouch__card-left { width: 100%; }
}


/* ── S-009 PAYMENT — 100% design parity (screens-checkout.tsx) ──────────── */
.mgk-pay__methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.mgk-pay__methods .mgk-optcard { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; text-align: left; border: 2px solid var(--mgk-border); background: var(--mgk-surface); border-radius: var(--mgk-radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.mgk-pay__methods .mgk-optcard__icon { font-size: 24px; margin-bottom: 6px; }
.mgk-pay__methods .mgk-optcard__label { font-weight: 600; font-size: 14px; color: var(--mgk-text); }
.mgk-pay__methods .mgk-optcard__desc { font-size: 12px; color: var(--mgk-text-3); margin-top: 2px; }
.mgk-pay__methods .mgk-optcard.is-sel { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }

/* PayNow (design: centered card with navy QR + amber BR-10 note) */
.mgk-paynow { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.mgk-paynow[hidden] { display: none; }
.mgk-paynow__box { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: 16px; padding: 24px; }
.mgk-paynow__title { font-weight: 600; font-size: 14px; color: var(--mgk-text); margin: 0; }
.mgk-paynow__qr { width: 192px; height: 192px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 12px; background: var(--mgk-surface); border: 3px solid var(--mgk-navy); border-radius: 12px; }
.mgk-paynow__cell { width: 100%; aspect-ratio: 1; border-radius: 2px; background: transparent; }
.mgk-paynow__cell.is-on { background: var(--mgk-navy); }
/* When the real scannable QR (canvas/img) is drawn, drop the 7-col placeholder
   grid — otherwise the canvas becomes a single 1/7-width grid cell (tiny QR). */
.mgk-paynow__qr.is-rendered { display: flex; align-items: center; justify-content: center; }
.mgk-paynow__qr.is-rendered canvas,
.mgk-paynow__qr.is-rendered img { width: 100%; height: 100%; display: block; }
.mgk-paynow__stripe { width: 200px; }
.mgk-paynow__stripe[hidden] { display: none; }
.mgk-paynow__expiry { display: flex; align-items: center; gap: 8px; color: var(--mgk-red); font-size: 14px; font-weight: 700; margin: 0; }
.mgk-paynow__expiry[hidden] { display: none; }
.mgk-paynow__pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mgk-red); animation: mgk-pulse 1.2s infinite; }
@keyframes mgk-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }
.mgk-paynow__amount { font-size: 26px; font-weight: 900; color: var(--mgk-text); margin: 0; }
.mgk-paynow__uen { font-size: 12px; color: var(--mgk-text-3); margin: 0; }
.mgk-paynow__status { margin: 0; font-size: 13px; color: var(--mgk-teal); font-weight: 600; }
.mgk-paynow__status[hidden] { display: none; }
.mgk-paynow__br10 { width: 100%; padding: 12px; border-radius: 12px; background: var(--mgk-amber-bg); border: 1px solid rgba(240,152,48,.19); color: var(--mgk-text-2); font-size: 12px; text-align: left; }
.mgk-paynow__br10-tag { color: var(--mgk-amber); font-weight: 600; }
/* BR-10-b: PayNow locked out after MGK_PAYNOW_QR_MAX_ATTEMPTS auto-regenerated
   QRs have all lapsed unpaid — steers the shopper to Card/COD instead. */
.mgk-paynow__locked { width: 100%; padding: 14px; border-radius: 12px; background: var(--mgk-red-bg, #FEF1F0); border: 1px solid rgba(240,68,56,.22); text-align: left; }
.mgk-paynow__locked[hidden] { display: none; }
.mgk-paynow__locked-msg { margin: 0 0 10px; font-size: 13px; color: var(--mgk-text-2); }
.mgk-paynow__locked-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Card form (design: 4 fields — Number / Name / Expiry / CVV + PCI badge) */
.mgk-card-form { display: flex; flex-direction: column; gap: 12px; }
.mgk-card-form[hidden] { display: none; }
.mgk-card-form__field { display: flex; flex-direction: column; gap: 4px; }
.mgk-card-form__field span { font-weight: 600; font-size: 14px; color: var(--mgk-text); }
.mgk-card-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mgk-card-form__input { width: 100%; padding: 10px 12px; border: 1px solid var(--mgk-border); border-radius: 12px; font-size: 14px; font-family: inherit; color: var(--mgk-text); background: var(--mgk-surface); box-sizing: border-box; }
.mgk-card-form__input:focus { outline: none; border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-card-form__stripe-mount.StripeElement--focus { border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-card-form__stripe-mount.StripeElement--invalid { border-color: #b3261e; }
/* Card errors are often a full explanation ("this card type can't be saved,
   try a different Visa/Mastercard"), not a three-word hint — so this reads as
   a proper red alert box with room to wrap, rather than one line of red text
   that a shopper skims past while wondering why the save silently failed. */
.mgk-card-form__err { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border: 1px solid #F5C2C0; border-left: 3px solid var(--mgk-red, #D93025); border-radius: 8px; background: #FDECEA; color: #A81E12; font-size: 13px; font-weight: 600; line-height: 1.5; }
.mgk-card-form__err::before { content: '⚠'; flex: 0 0 auto; font-size: 14px; line-height: 1.4; }
.mgk-card-form__err[hidden] { display: none; }
.mgk-card-form__savecard { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mgk-text-2); cursor: pointer; }
.mgk-card-form__savecard input { margin: 0; }
.mgk-pay__pci { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: #E7F0FB; border: 1px solid rgba(21,101,192,.19); color: var(--mgk-blue); font-size: 12px; }

/* GrabPay (design parity placeholder) */
.mgk-grabpay { display: flex; justify-content: center; }
.mgk-grabpay[hidden] { display: none; }
.mgk-grabpay__panel { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; background: var(--mgk-bg-alt); border: 1px solid var(--mgk-border); border-radius: 16px; padding: 28px 32px; text-align: center; }
.mgk-grabpay__icon { font-size: 36px; }
.mgk-grabpay__title { font-weight: 700; font-size: 15px; color: var(--mgk-text); margin: 0; }
.mgk-grabpay__sub { font-size: 13px; color: var(--mgk-text-2); margin: 0; }

/* Billing Breakdown panel (design GSTPanel) */
.mgk-gstpanel { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.mgk-gstpanel__row { display: flex; justify-content: space-between; color: var(--mgk-text-2); }
.mgk-gstpanel__row--total { font-weight: 700; color: var(--mgk-text); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--mgk-border); }
/* Informational per-tax-class row on a mixed order — states a taxable-base
   component, not another charge, so it is de-emphasised against the real rows. */
.mgk-gstpanel__row--muted { font-size: 12px; color: var(--mgk-text-3); }
.mgk-gstpanel__reg { font-size: 12px; color: var(--mgk-text-3); margin: 4px 0 0; }

/* Payment-failed CTA (US-008) */
.mgk-pay__failed { margin-top: 16px; padding: 14px; border: 1px solid var(--mgk-red); background: var(--mgk-red-bg); border-radius: 12px; }
.mgk-pay__failed[hidden] { display: none; }
.mgk-pay__failed-msg { color: var(--mgk-red); margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.mgk-pay__failed-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── S-009 Card — Stripe Payment Element container (PCI-safe iframe) ─────── */
.mgk-card-form__stripe { min-height: 44px; padding: 10px 12px; border: 1px solid var(--mgk-border); border-radius: 12px; background: var(--mgk-surface); transition: border-color .15s, box-shadow .15s; }
.mgk-card-form__stripe.is-focused { border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-card-form__stripe.is-invalid { border-color: var(--mgk-red); }
.mgk-card-form__loading { display: block; font-size: 13px; color: var(--mgk-text-3); }

/* ── 071 Invoice Popup (S-021/S-017 companion) ──────────────────────────── */
.mgk-invoice { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mgk-invoice[hidden] { display: none; }
.mgk-invoice__backdrop { position: absolute; inset: 0; background: rgba(27,58,82,.55); backdrop-filter: blur(2px); }
.mgk-invoice__dialog { position: relative; z-index: 1; width: 100%; max-width: 640px; max-height: 90vh; display: flex; flex-direction: column; background: var(--mgk-surface); border-radius: var(--mgk-radius); box-shadow: var(--mgk-shadow-lg); overflow: hidden; }
.mgk-invoice__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--mgk-border); }
.mgk-invoice__title { font-size: 18px; font-weight: 800; color: var(--mgk-text); margin: 0; }
.mgk-invoice__x { background: var(--mgk-bg-alt); border: none; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; color: var(--mgk-text-2); display: flex; align-items: center; justify-content: center; transition: background .15s; }
.mgk-invoice__x:hover { background: var(--mgk-border); }
.mgk-invoice__scroll { overflow-y: auto; padding: 24px; flex: 1; }
.mgk-invoice__loading { text-align: center; color: var(--mgk-text-3); font-size: 14px; padding: 40px 0; margin: 0; }

.mgk-invoice__doc { display: flex; flex-direction: column; gap: 26px; color: var(--mgk-text); font-family: var(--mgk-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-size: 14px; line-height: 1.5; }
/* Header: business (left) + invoice meta (right), thick brand rule under. */
.mgk-invoice__doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 3px solid var(--mgk-navy); flex-wrap: wrap; }
.mgk-invoice__seller { min-width: 240px; }
.mgk-invoice__seller-name { font-size: 24px; font-weight: 800; color: var(--mgk-navy); margin: 0 0 8px; letter-spacing: -.01em; line-height: 1.15; }
.mgk-invoice__seller-reg { font-size: 12.5px; color: var(--mgk-text-2); margin: 0 0 4px; line-height: 1.55; font-weight: 500; }
.mgk-invoice__doc-meta { text-align: right; min-width: 190px; }
.mgk-invoice__doc-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mgk-text-3); margin: 0; }
.mgk-invoice__doc-no { font-size: 20px; font-weight: 800; color: var(--mgk-text); margin: 2px 0 14px; }
.mgk-invoice__doc-meta-row { display: flex; justify-content: space-between; gap: 16px; min-width: 180px; margin: 0 0 6px auto; padding: 7px 12px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); font-size: 12px; }
.mgk-invoice__doc-meta-row span:first-child { color: var(--mgk-text-3); }
.mgk-invoice__doc-meta-row span:last-child { font-weight: 700; color: var(--mgk-text); }
/* Parties: Bill To / Ship To / Payment as stacked shaded rows. */
.mgk-invoice__parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.mgk-invoice__party-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--mgk-navy); margin-bottom: 7px; }
/* Bill To / Ship To / Payment: one labeled "LABEL value" row per field so every
   value is clearly named (no more dumping the formatted address blob). */
.mgk-invoice__party-rows { display: flex; flex-direction: column; gap: 5px; }
.mgk-invoice__party-field { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; }
.mgk-invoice__field-label { flex: 0 0 58px; color: var(--mgk-text-3); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
.mgk-invoice__field-value { flex: 1 1 auto; min-width: 0; color: var(--mgk-text-2); font-weight: 500; overflow-wrap: anywhere; }
.mgk-invoice__party-field--name .mgk-invoice__field-value { color: var(--mgk-text); font-weight: 800; font-size: 14px; }
/* Legacy single-line rows kept as a fallback for pre-structured snapshots. */
.mgk-invoice__party-row { font-size: 13.5px; color: var(--mgk-text-2); line-height: 1.6; font-weight: 500; }
.mgk-invoice__party-row--name { font-weight: 800; font-size: 15px; color: var(--mgk-text); margin-bottom: 3px; letter-spacing: -.01em; }
/* Items table: shaded header, roomy spaced rows. */
.mgk-invoice__items { display: flex; flex-direction: column; }
/* Items table: clear dark grid + zebra rows for easy scanning. */
.mgk-invoice__table-wrap { overflow-x: auto; border: 1.5px solid var(--mgk-navy); border-radius: var(--mgk-radius-sm); }
.mgk-invoice__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mgk-invoice__table thead th { background: var(--mgk-navy); text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; padding: 12px 14px; }
.mgk-invoice__table thead th.mgk-invoice__num { text-align: right; }
.mgk-invoice__table tbody tr { background: var(--mgk-surface); }
.mgk-invoice__table tbody tr:nth-child(even) { background: var(--mgk-bg-alt); }
.mgk-invoice__row td { padding: 13px 14px; border-bottom: 1px solid var(--mgk-border); color: var(--mgk-text-2); }
.mgk-invoice__row td + td { border-left: 1px solid var(--mgk-border); }
.mgk-invoice__row:last-child td { border-bottom: 0; }
.mgk-invoice__item-name { font-weight: 700; color: var(--mgk-text); }
.mgk-invoice__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Totals: right-aligned stack, bold brand grand total. */
.mgk-invoice__totals { display: flex; flex-direction: column; gap: 9px; align-self: flex-end; min-width: 300px; }
/* GST-registered orders group the totals into two bordered boxes (Shopee-style):
   charges/discount → Net Paid, then that same figure broken into excl-GST/GST/incl-GST.
   Unregistered orders keep the old flat list (no box), so this class is unused there. */
.mgk-invoice__totals-box { display: flex; flex-direction: column; gap: 9px; border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); padding: 14px 16px; }
.mgk-invoice__total-line { display: flex; justify-content: space-between; gap: 24px; font-size: 14px; color: var(--mgk-text); }
.mgk-invoice__total-line span:first-child { color: var(--mgk-text-2); }
.mgk-invoice__grand { font-size: 19px; font-weight: 800; color: var(--mgk-navy); padding-top: 13px; margin-top: 5px; border-top: 2px solid var(--mgk-navy); }
.mgk-invoice__grand span:first-child { color: var(--mgk-navy); }
.mgk-invoice__note { font-size: 12px; color: var(--mgk-text-3); margin: 0; font-style: italic; border-top: 1px solid var(--mgk-border-lt); padding-top: 16px; }

.mgk-invoice__actions { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--mgk-border); background: var(--mgk-bg-alt); }
body.mgk-invoice-open { overflow: hidden; }

/* Export → print only the invoice (hide the rest of the page). */
@media print {
  /* .mgk-invoice is 4 levels deep inside the page's Elementor container tree
     (widget-container > widget > e-con > .elementor-<id> > body), not a
     direct child of body, so the old `body > * { visibility:hidden }` only
     hid the OUTERMOST wrapper — everything between it and .mgk-invoice
     (the header/order-tracking/footer sibling containers alongside it) kept
     its inherited hidden visibility but, since visibility:hidden preserves
     layout space, still occupied its full normal-flow height above the
     invoice. Combined with .mgk-invoice's own position:absolute (needed to
     escape that flow), Chrome's per-page containing-block box for an
     absolutely-positioned element is page-bound, so content past page 1
     didn't continue — it re-rendered from the top, producing a blank first
     page + a repeated header on page 2. display:none (not visibility)
     collapses every unrelated element's space at every depth, via :has() so
     it works regardless of how deep .mgk-invoice sits, which lets it (now
     position:static, plain normal flow) start right at the top of page 1
     and paginate across as many pages as the content actually needs. */
  html.mgk-printing-invoice body *:not(:has(.mgk-invoice)):not(.mgk-invoice):not(.mgk-invoice *) { display: none !important; }
  html.mgk-printing-invoice .mgk-invoice { position: static; inset: auto; padding: 0; display: block; }
  html.mgk-printing-invoice .mgk-invoice__backdrop,
  html.mgk-printing-invoice .mgk-invoice__head,
  html.mgk-printing-invoice .mgk-invoice__actions { display: none !important; }
  /* Both were flex boxes on screen (.mgk-invoice__dialog as the flex column,
     .mgk-invoice__scroll as its flex:1 child) so they could cap the dialog at
     90vh and scroll internally. Chrome does not paginate flex layouts across
     print pages — .mgk-invoice__scroll kept resolving to the one-page
     viewport height instead of its real (taller) content height, so anything
     past that line was pushed onto a mostly-blank second page. Dropping both
     to plain block flow with an auto height lets the invoice's real content
     height drive normal, correct pagination. */
  html.mgk-printing-invoice .mgk-invoice__dialog { display: block; max-width: 100%; height: auto; max-height: none; box-shadow: none; border-radius: 0; overflow: visible; }
  html.mgk-printing-invoice .mgk-invoice__scroll { display: block; flex: none; overflow: visible; height: auto; max-height: none; padding: 0; }

  /* The invoice document itself nests several more flex/grid boxes
     (doc-head, the Bill To/Ship To/Payment grid, the totals stack). Chrome
     doesn't fragment flex/grid containers across a page break correctly —
     when one needs to split, it can re-render (duplicate) its content on the
     next page instead of continuing it, which is what produced the
     half-empty page 1 + repeated header on page 2. None of these need to stay
     flex/grid for a printed page, so they drop to plain block flow (which
     Chrome paginates correctly); each loses its `gap`, replaced below with an
     equivalent margin so the spacing is unchanged. */
  html.mgk-printing-invoice .mgk-invoice__doc { display: block; }
  html.mgk-printing-invoice .mgk-invoice__doc > * { margin-bottom: 26px; }
  html.mgk-printing-invoice .mgk-invoice__doc > *:last-child { margin-bottom: 0; }
  html.mgk-printing-invoice .mgk-invoice__doc-head { display: block; }
  html.mgk-printing-invoice .mgk-invoice__doc-meta { text-align: left; margin-top: 14px; }
  html.mgk-printing-invoice .mgk-invoice__doc-meta-row { margin: 0 0 6px 0; }
  html.mgk-printing-invoice .mgk-invoice__parties { display: block; }
  html.mgk-printing-invoice .mgk-invoice__party { display: block; margin-bottom: 20px; }
  html.mgk-printing-invoice .mgk-invoice__party:last-child { margin-bottom: 0; }
  html.mgk-printing-invoice .mgk-invoice__items { display: block; }
  html.mgk-printing-invoice .mgk-invoice__totals { display: block; width: 300px; margin-left: auto; }
  html.mgk-printing-invoice .mgk-invoice__totals-box { display: block; margin-bottom: 14px; break-inside: avoid; page-break-inside: avoid; }
  html.mgk-printing-invoice .mgk-invoice__totals-box:last-child { margin-bottom: 0; }
  html.mgk-printing-invoice .mgk-invoice__total-line { margin-bottom: 9px; }
}

@media (max-width: 560px) {
  .mgk-invoice { padding: 0; align-items: stretch; }
  .mgk-invoice__dialog { max-width: 100%; max-height: 100vh; border-radius: 0; }
  .mgk-invoice__totals { min-width: 0; width: 100%; align-self: stretch; }
}

/* ════════════════════════════════════════════════════════════════════════════
 * AUTH — Login / Register / Reset (mgk_login). Logged-out screen with its own
 * navy nav (like LANDING) + a centred card. Reuses .mgk-field / .mgk-btn / .mgk-card.
 * ════════════════════════════════════════════════════════════════════════════ */
.mgk-auth { display: flex; flex-direction: column; gap: 0; padding: 0; min-height: 100vh; background: var(--mgk-bg); }
.mgk-auth__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--mgk-navy); padding: 14px var(--mgk-pad-x); }
.mgk-auth__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mgk-auth__logo { width: 32px; height: 32px; border-radius: var(--mgk-radius-sm); background: var(--mgk-teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; }
.mgk-auth__brand-text { display: flex; flex-direction: column; }
.mgk-auth__brand-name { color: #fff; font-weight: 700; font-size: 14px; }
.mgk-auth__brand-tag { color: rgba(255,255,255,.5); font-size: 10px; }
.mgk-auth__guest { color: #fff; border: 1px solid rgba(255,255,255,.3); background: transparent; }
.mgk-auth__wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 40px var(--mgk-pad-x) 56px; }
.mgk-auth__card { width: 100%; max-width: 440px; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--mgk-shadow-lg); }
.mgk-auth__head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mgk-auth__head-logo { width: 48px; height: 48px; border-radius: 14px; background: var(--mgk-teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; margin-bottom: 4px; }
.mgk-auth__heading { font-size: 24px; font-weight: 800; color: var(--mgk-text); margin: 0; }
.mgk-auth__sub { font-size: 14px; color: var(--mgk-text-2); margin: 0; line-height: 1.5; }
.mgk-auth__tabs { display: flex; gap: 4px; background: var(--mgk-bg-alt); border-radius: var(--mgk-radius-sm); padding: 4px; }
.mgk-auth__tab { flex: 1; border: none; background: transparent; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 14px; color: var(--mgk-text-2); padding: 9px 12px; border-radius: 9px; transition: background .15s, color .15s; }
.mgk-auth__tab.is-active { background: var(--mgk-surface); color: var(--mgk-navy); box-shadow: var(--mgk-shadow); }
.mgk-auth__panel { display: none; flex-direction: column; gap: 2px; }
.mgk-auth__panel.is-active { display: flex; }
.mgk-auth__panel[hidden] { display: none; }
.mgk-auth__panel .mgk-field { margin-bottom: 10px; }
.mgk-auth__panel .mgk-field input:focus { outline: none; border-color: var(--mgk-teal); box-shadow: 0 0 0 3px var(--mgk-teal-bg); }
.mgk-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 14px; }
.mgk-auth__remember, .mgk-auth__check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mgk-text-2); cursor: pointer; line-height: 1.4; }
.mgk-auth__check { margin: 4px 0 14px; }
.mgk-auth__remember input, .mgk-auth__check input { accent-color: var(--mgk-teal); flex: 0 0 auto; }
.mgk-auth__link { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--mgk-teal); padding: 0; }
.mgk-auth__link:hover { text-decoration: underline; }
.mgk-auth__submit { width: 100%; }
.mgk-auth__back { display: block; width: 100%; text-align: center; margin-top: 14px; }
.mgk-auth__reset-title { font-size: 17px; font-weight: 700; color: var(--mgk-text); margin: 0 0 4px; }
.mgk-auth__reset-sub { font-size: 13px; color: var(--mgk-text-2); line-height: 1.5; margin: 0 0 14px; }
.mgk-auth__notice { font-size: 13px; line-height: 1.45; border-radius: var(--mgk-radius-sm); padding: 10px 12px; margin: 0; }
.mgk-auth__notice.is-err { background: var(--mgk-red-bg); color: var(--mgk-red); }
.mgk-auth__notice.is-ok { background: var(--mgk-green-bg); color: var(--mgk-green); }
.mgk-auth__trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.mgk-auth__trust-item { display: inline-flex; align-items: center; gap: 6px; color: var(--mgk-text-2); font-size: 13px; }
.mgk-auth__trust-icon { font-size: 14px; }
@media (max-width: 600px) { .mgk-auth__card { padding: 20px; } .mgk-auth__wrap { padding-top: 28px; } }

/* ── Average stars (fractional fill) — a gold overlay clipped to avg/5 over a
   grey base so 4.3 shows the 5th star ~30% filled (mgk_avg_stars_html). ───── */
.mgk-stars { position: relative; display: inline-block; white-space: nowrap; line-height: 1; }
.mgk-stars__bg { color: var(--mgk-line, #d9e0e3); }
.mgk-stars__fg {
	position: absolute; left: 0; top: 0; overflow: hidden;
	color: var(--mgk-amber, #f6a609); white-space: nowrap;
}

/* ── Send Feedback (S-031) ───────────────────────────────────────────────── */
.mgk-fdbk { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.mgk-fdbk__head { text-align: left; }
.mgk-fdbk__heading { font-size: 26px; font-weight: 800; color: var(--mgk-text); margin: 4px 0 4px; }
.mgk-fdbk__sub { color: var(--mgk-text-2); margin: 0; }
.mgk-fdbk__block-title { font-size: 15px; font-weight: 700; color: var(--mgk-text); margin: 0 0 4px; }
.mgk-fdbk__block-sub { font-size: 13px; color: var(--mgk-text-3); margin: 0 0 12px; }
/* Order picker — reuses the .mgk-optcard is-sel convention but as a full-width row. */
.mgk-fdbk__orders { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.mgk-fdbk__order {
	display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
	text-align: left; padding: 12px 14px; border: 2px solid var(--mgk-border); border-radius: var(--mgk-radius-sm);
	background: var(--mgk-surface); cursor: pointer; font-family: inherit; transition: border-color .15s, background .15s;
}
.mgk-fdbk__order.is-sel { border-color: var(--mgk-navy); background: var(--mgk-bg-alt); }
.mgk-fdbk__order-icon { font-size: 22px; flex: none; }
.mgk-fdbk__order-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mgk-fdbk__order-id { font-weight: 700; font-size: 14px; color: var(--mgk-navy); }
.mgk-fdbk__order-meta { font-size: 12px; color: var(--mgk-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgk-fdbk__order-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--mgk-border); flex: none; }
.mgk-fdbk__order.is-sel .mgk-fdbk__order-check { border-color: var(--mgk-navy); background: var(--mgk-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat; }
.mgk-fdbk__stars { display: flex; gap: 6px; }
.mgk-fdbk__star {
	appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0 2px;
	font-size: 40px; line-height: 1; color: var(--mgk-line, #d9e0e3); transition: color .12s ease, transform .12s ease;
}
.mgk-fdbk__star:hover { transform: scale(1.08); }
.mgk-fdbk__star.is-on { color: var(--mgk-amber, #f6a609); }
.mgk-fdbk__textarea {
	width: 100%; box-sizing: border-box; resize: vertical; min-height: 96px;
	border: 1px solid var(--mgk-line, #d9e0e3); border-radius: 10px; padding: 12px 14px;
	font: inherit; color: var(--mgk-text); background: #fff;
}
.mgk-fdbk__textarea:focus { outline: none; border-color: var(--mgk-teal, #0a8a6b); }
.mgk-fdbk__counter { font-size: 12px; color: var(--mgk-text-3); margin: 6px 0 0; }
.mgk-fdbk__photos { display: flex; flex-wrap: wrap; gap: 12px; }
.mgk-fdbk__photo-add {
	width: 96px; height: 96px; border: 2px dashed var(--mgk-border); border-radius: var(--mgk-radius-sm);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	color: var(--mgk-text-3); font-size: 12px; cursor: pointer; transition: border-color .15s, color .15s;
}
.mgk-fdbk__photo-add:hover { border-color: var(--mgk-teal, #0a8a6b); color: var(--mgk-teal, #0a8a6b); }
.mgk-fdbk__photo-icon { font-size: 22px; }
.mgk-fdbk__photo-thumb { position: relative; width: 96px; height: 96px; border-radius: var(--mgk-radius-sm); overflow: hidden; flex: none; }
body .mgk-fdbk__photo-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.mgk-fdbk__photo-remove {
	position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
	background: rgba(0,0,0,.6); color: #fff; border: none; cursor: pointer; font-size: 13px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.mgk-fdbk__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mgk-text-2); background: var(--mgk-bg-2, #f2f5f6); padding: 14px 16px; border-radius: 10px; }
.mgk-fdbk__consent input { margin-top: 2px; flex: none; }
.mgk-fdbk__err { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.mgk-fdbk__actions { display: flex; align-items: center; gap: 16px; }
.mgk-fdbk__submit { flex: 1; }
.mgk-fdbk__submit:disabled { opacity: .5; cursor: not-allowed; }
.mgk-fdbk__cancel { color: var(--mgk-text-2); text-decoration: none; }
.mgk-fdbk__cancel:hover { text-decoration: underline; }
.mgk-fdbk__gate { text-align: center; font-size: 12px; color: var(--mgk-text-3); margin: 4px 0 0; }
.mgk-pdp__reviews-head-actions { display: flex; gap: 8px; align-items: center; }

/* Empty state — a product (or reviews page) with no reviews yet. */
.mgk-pdp__reviews-empty,
.mgk-rev__empty {
	text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
	padding: 32px 20px; color: var(--mgk-text-2);
}
.mgk-pdp__reviews-empty-icon,
.mgk-rev__empty-icon { font-size: 32px; filter: grayscale(1); opacity: .6; }
.mgk-pdp__reviews-empty-title,
.mgk-rev__empty-title { font-size: 16px; font-weight: 700; color: var(--mgk-text); margin: 4px 0 0; }
.mgk-pdp__reviews-empty-text,
.mgk-rev__empty-text { margin: 0 0 8px; font-size: 14px; }
/* "Verified" tag on a review card — blue outlined rectangle per the S-005
   design (Arco-style Tag), not the rounded green chip used elsewhere. */
.mgk-pdp__review-verified {
	box-sizing: border-box; display: inline-flex; flex-direction: row; align-items: center; gap: 4px;
	padding: 3px 8px; background: #E8F7FF; border: 1px solid #3491FA; border-radius: 4px;
	font-family: 'Quicksand', var(--mgk-font); font-weight: 500; font-size: 12px; line-height: 16px; color: #3491FA;
	white-space: nowrap;
}

/* ── Responsive — S-011+ two-column grids ────────────────────────────────
   These grids are declared after the main responsive block near line 530,
   so their collapse rules must live below them to win the cascade. */
@media (max-width: 1024px) {
	.mgk-cc__grid { grid-template-columns: 1fr; }
	/* S-026 summary card is a 120px-gap horizontal split on desktop; below
	   1024px the bars have no room beside the average, so it stacks. */
	.mgk-rev__summary { flex-direction: column; align-items: stretch; gap: 16px; }
	.mgk-rev__dist { width: 100%; }
	.mgk-acct__top, .mgk-acct__mid { flex-direction: column; }
	.mgk-acct__stats { width: auto; }
}


/* Checkout Block/Unit combobox — the field itself is the saved-address picker
   (mgk-storefront.js data-mgk-combo). Panel styled like .mgk-notif__dropdown. */
.mgk-combo { position: relative; }
.mgk-combo__control { position: relative; display: block; }
.mgk-combo__control input { width: 100%; padding-right: 34px; }
.mgk-combo__toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 12px; line-height: 1; color: var(--mgk-text-muted, #667); padding: 4px; }
.mgk-combo__list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60; margin: 0; padding: 4px; list-style: none; background: var(--mgk-surface); border: 1px solid var(--mgk-border); border-radius: var(--mgk-radius-sm); box-shadow: var(--mgk-shadow-lg); max-height: 240px; overflow-y: auto; }
.mgk-combo__list[hidden] { display: none; }
.mgk-combo__opt { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--mgk-radius-sm); cursor: pointer; }
.mgk-combo__opt[hidden] { display: none; }
.mgk-combo__opt:hover { background: var(--mgk-teal-bg); }
.mgk-combo__opt-name { font-size: 13px; font-weight: 600; color: var(--mgk-text); }
.mgk-combo__opt-detail { font-size: 12px; color: var(--mgk-text-muted, #667); }
.mgk-combo__opt--new { font-weight: 600; color: var(--mgk-teal); border-top: 1px solid var(--mgk-border); margin-top: 2px; }

/* ── 040b Seasonal Campaign product page (/seasonal/<slug>/) ────────────── */
.mgk-seasoncamp { display: flex; flex-direction: column; gap: 24px; }
.mgk-seasoncamp__hero { position: relative; overflow: hidden; border-radius: 0; background-color: var(--mgk-navy-900); padding: 24px clamp(36px, 7.8vw, 112px); min-height: 176px; display: flex; align-items: center; box-sizing: border-box; }
.mgk-seasoncamp__hero--has-image {
	width: calc(100% + (var(--mgk-pad-x) * 2));
	margin-inline: calc(var(--mgk-pad-x) * -1);
	aspect-ratio: 1440 / 176;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.mgk-seasoncamp__hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,25,55,.98) 0%, rgba(6,25,55,.9) 42%, rgba(6,25,55,.34) 70%, rgba(6,25,55,.08) 100%); z-index: 0; }
.mgk-seasoncamp__hero-body { position: relative; z-index: 1; max-width: 640px; }
.mgk-seasoncamp__breadcrumb { font-size: 13px; color: rgba(255,255,255,.7); margin: 0 0 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-seasoncamp__breadcrumb a { color: rgba(255,255,255,.7); text-decoration: none; }
.mgk-seasoncamp__breadcrumb a:hover { color: #fff; text-decoration: underline; }
.mgk-seasoncamp__title { font-size: 34px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.mgk-seasoncamp__sub { font-size: 14px; color: rgba(255,255,255,.75); margin: 0 0 16px; }
.mgk-seasoncamp__countdown { display: inline-flex; align-items: center; gap: 6px; background: var(--mgk-red); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px; }
.mgk-seasoncamp__toolbar { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--mgk-border); }
.mgk-seasoncamp__toolbar-checks { display: flex; align-items: center; gap: 24px; }
.mgk-seasoncamp__toolbar-selects { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mgk-seasoncamp__check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--mgk-text); cursor: pointer; }
.mgk-seasoncamp__check input[type="checkbox"] { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--mgk-navy); border-radius: 5px; margin: 0; cursor: pointer; position: relative; flex-shrink: 0; }
.mgk-seasoncamp__check input[type="checkbox"]:checked { background: var(--mgk-navy); }
/* inset:0 + margin:auto centers the 5×9 rect itself within the 18×18 box
   before the rotate — fixed left/top offsets (the previous approach) center
   the UNROTATED box, which then swings the rotated tick off-center since the
   rect's own center isn't at its geometric middle relative to those edges. */
.mgk-seasoncamp__check input[type="checkbox"]:checked::after { content: ''; position: absolute; inset: 0; margin: auto; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.mgk-seasoncamp__select { border: none; background: var(--mgk-bg-alt); color: var(--mgk-text); border-radius: 999px; padding: 9px 14px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3A52' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 34px; }
.mgk-seasoncamp__grid { margin-top: 4px; }
.mgk-seasoncamp__cell[hidden] { display: none; }
/* The grid stretches .mgk-seasoncamp__cell to the row's tallest card
   (mgk-grid's default align-items: stretch), but the .mgk-prod link inside
   only sizes to its own content unless told to fill that stretched cell —
   without this, a card with a SAVE pill (taller content) grows the CELL but
   leaves shorter cards' actual .mgk-prod card short, misaligning their
   "Add to cart" buttons row-to-row. */
.mgk-seasoncamp__cell { display: flex; }
.mgk-seasoncamp__cell .mgk-prod { width: 100%; }
.mgk-seasoncamp__notfound { max-width: 480px; margin: 60px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mgk-seasoncamp__notfound-title { font-size: 22px; font-weight: 700; color: var(--mgk-text); margin: 0; }
.mgk-seasoncamp__notfound-sub { font-size: 14px; color: var(--mgk-text-2); margin: 0 0 8px; }
@media (max-width: 1200px) { .mgk-seasoncamp .mgk-grid--5 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px) { .mgk-seasoncamp .mgk-grid--5 { grid-template-columns: repeat(3, 1fr); } .mgk-seasoncamp__title { font-size: 26px; } }
@media (max-width: 640px) {
	.mgk-seasoncamp .mgk-grid--5 { grid-template-columns: repeat(2, 1fr); }
	.mgk-seasoncamp__hero { min-height: 260px; padding: 28px 20px; }
	.mgk-seasoncamp__hero--has-image { aspect-ratio: auto; background-position: 62% center; }
	.mgk-seasoncamp__hero-overlay { background: linear-gradient(90deg, rgba(6,25,55,.94), rgba(6,25,55,.55)); }
	.mgk-seasonal__hero--photo.mgk-seasonal__hero--has-image { grid-template-columns: 1fr; padding: 0; }
	.mgk-seasonal__hero-photo { grid-column: 1; grid-row: 1; min-height: 180px; max-height: 220px; }
	.mgk-seasonal__hero--has-image .mgk-seasonal__hero-body { grid-column: 1; grid-row: 2; padding: 24px 20px; }
	.mgk-seasonal__hero--image-only { height: 300px; min-height: 300px; padding: 24px 20px; }
	.mgk-seasonal__hero--image-only .mgk-seasonal__hero-overlay { background: linear-gradient(90deg, rgba(6,25,55,.88), rgba(6,25,55,.35)); }
}

/* ── Checkout-only header (checkout.svg) ──────────────────────
   Replaces the site-wide nav+search+cart header on fm-checkout — see the
   'mgk-is-checkout' body class (inc/mgk-setup.php) and .mgk-checkout__header
   markup (template-parts/pages/checkout.php). The shared header is
   position:fixed with body padding-top reserving its height (mgk-retail.css
   L76-90 above); both are undone here so this in-flow header takes its place
   instead of stacking underneath it. */
body.mgk-is-checkout .mgk-header { display: none; }
body.mgk-is-checkout { padding-top: 0; }
.mgk-checkout__header { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; background: #fff; box-shadow: 0 2px 12px rgba(15, 23, 41, .06); font-family: 'Quicksand', var(--mgk-font); }
.mgk-checkout__header-back { color: #1B3A52; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.mgk-checkout__header-back:hover { text-decoration: underline; }
.mgk-checkout__header-brand { font-weight: 700; font-size: 18px; color: #061937; }
.mgk-checkout__header-secure { font-weight: 600; font-size: 12.5px; color: #8A9FB5; }

/* ── Checkout: billing toggle as a real switch (checkout.svg), not a bare
   checkbox — same on/off semantics, data-mgk-billing-toggle JS untouched. */
.mgk-checkout__billing-toggle input[type="checkbox"] {
	appearance: none; -webkit-appearance: none; width: 36px; height: 20px; margin: 0;
	background: #D7D7DB; border-radius: 999px; position: relative; cursor: pointer;
	transition: background .15s; flex: 0 0 auto;
}
.mgk-checkout__billing-toggle input[type="checkbox"]::before {
	content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
	background: #fff; border-radius: 50%; transition: left .15s;
}
.mgk-checkout__billing-toggle input[type="checkbox"]:checked { background: var(--mgk-teal); }
.mgk-checkout__billing-toggle input[type="checkbox"]:checked::before { left: 18px; }

/* ── Order Summary: Free delivery (green, not a hidden row), split
   auto-applied offer vs. entered voucher, and a remove (×) on the voucher
   row (checkout.svg's "Raya offer" + "Promo FRESH5 ×" both shown at once). */
.mgk-gst__row--free { color: var(--mgk-green, #16875A); font-weight: 700; }
.mgk-gst__row--discount [data-mgk-sum-discount], .mgk-gst__row--discount [data-mgk-sum-private-discount] { color: #22A86B; font-weight: 700; }
.mgk-gst__discount-remove { background: none; border: none; padding: 0; margin-left: 6px; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; vertical-align: middle; }
.mgk-gst__discount-remove:hover { opacity: .7; }

/* ── Order Summary collapse toggle (checkout.svg's circular "︿" button under
   the item rows) — purely a "scroll to reveal the rest" affordance over the
   existing item list; no new data source. */
.mgk-checkout__sumcollapse { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: 4px auto 8px; padding: 0; border-radius: 50%; border: none; background: none; cursor: pointer; transform: rotate(180deg); transition: transform .15s; }
.mgk-checkout__sumcollapse svg { display: block; width: 24px; height: 24px; }
.mgk-checkout__sumcollapse:hover { opacity: .85; }
.mgk-checkout__sumcollapse.is-expanded { transform: rotate(0deg); }
.mgk-checkout__sumitems--collapsed .mgk-sumitems__row:nth-child(n+3) { display: none; }

/* Order Confirmed's own "View more N items" / "View less" pill — unlike
   Checkout's icon-only circle, this one carries a visible text label (design:
   order-confirmed), so it gets its own rule rather than reusing
   .mgk-checkout__sumcollapse. Applies at every viewport: the list-collapse
   itself (§ below, .mgk-success__items--collapsed) is no longer phone-only. */
.mgk-success__sumcollapse {
	display: none; align-items: center; justify-content: center; gap: 4px;
	margin: 8px auto 16px; padding: 0; border: none; background: none;
	font-size: 13.5px; font-weight: 600; color: #4A6580; cursor: pointer;
}
/* Shown only once the list it controls is actually collapsible (same
   JS-wired gate as the hiding rule below) — never a button that does
   nothing. */
[data-mgk-sumitems-ready] + .mgk-success__sumcollapse { display: flex; }
.mgk-success__sumcollapse svg { display: block; width: 20px; height: 20px; transform: rotate(180deg); transition: transform .15s; }
.mgk-success__sumcollapse.is-expanded svg { transform: rotate(0deg); }
.mgk-success__sumcollapse:hover { opacity: .85; }
/* Rows past the 3rd are hidden while collapsed, at every viewport. */
.mgk-success__items--collapsed[data-mgk-sumitems-ready] .mgk-success__item:nth-child(n+4) { display: none; }

/* ── Home (mobile): section reorder (UI-html/home-mobie.svg) ──────────────
   Desktop/tablet keep the Elementor-authored order (header, hero, marquee,
   flash deals, promo, categories, fresh picks, appliance banner, trending,
   footer). The phone mockup instead reads banner → category → flash deals
   → banner2 (appliance) → quick reorder → promotion → fresh picks →
   popular, so on mobile only: Shop Categories moves up before Flash
   Deals, and Appliance Banner + Quick Reorder both move up between Flash
   Deals and Promo — everything else stays in its original relative
   position.
   Each Elementor top-level section is its own singleton flex container
   (.e-con.e-parent) with no shared flex parent, so CSS `order` has nothing
   to act on by default: the page root (.elementor.elementor-{id}) is
   promoted to `display:flex` here so its .e-con children become orderable,
   then each one is targeted by its widget's data-widget_type (stable
   regardless of authored position; .mgk-featured-products/.mgk-trending-
   products would collide since both share the .mgk-products class). Every
   section needs an explicit order (not just the ones moving) — flex items
   left at the `order:0` default would otherwise sort before any positive
   value, jumping ahead of sections we didn't mean to touch. */
@media (max-width: 640px) {
	body.home .elementor { display: flex; flex-direction: column; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_header.default"]) { order: 1; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_hero_v2.default"]) { order: 2; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_marquee.default"]) { order: 3; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_category_grid.default"]) { order: 4; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_flash_deals.default"]) { order: 5; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_appliance_banner.default"]) { order: 6; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_quick_reorder.default"]) { order: 7; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_promo.default"]) { order: 8; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_featured_products.default"]) { order: 9; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_trending_products.default"]) { order: 10; }
	body.home .elementor > .e-con:has([data-widget_type="mgk_footer.default"]) { order: 11; }
}

/* ── Home (mobile): card counts (UI-html/home-mobie.svg) ───────────────────
   The PHP `limit` attrs stay as authored (they also drive desktop/tablet
   and the "View all N" copy) — cards beyond the mockup's mobile count are
   still rendered in the DOM, just hidden here. Popular in Singapore
   (mgk_trending_products) shows 6 — Today's Fresh Picks (mgk_featured_products,
   same .mgk-products/.mgk-grid markup) is unaffected, so the cap is scoped
   via the widget's data-widget_type ancestor rather than the shared
   .mgk-products class. Flash Deals is EXCLUDED from this cap now that its
   mobile layout is a horizontal-scroll row (see .mgk-flashwrap__grid above) —
   all fetched deals stay reachable by swiping instead of being capped to 2. */
@media (max-width: 640px) {
	/* Cap lifts once the shopper clicks "Load more" (initTrendingLoadMore()
	   sets data-mgk-trending-expanded): without that, every card the button
	   fetches lands in this hidden zone and the button looks dead. */
	[data-widget_type="mgk_trending_products.default"] .mgk-grid:not([data-mgk-trending-expanded]) .mgk-prod:nth-child(n+7) { display: none; }
}

/* ── Account logout confirmation ───────────────────────────────────────── */
body.mgk-dialog-open { overflow: hidden; }
.mgk-logout-dialog[hidden] { display: none; }
.mgk-logout-dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.mgk-logout-dialog__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 20, 42, .46);
	backdrop-filter: blur(2px);
}
.mgk-logout-dialog__panel {
	position: relative;
	width: min(100%, 480px);
	padding: 36px 44px 32px;
	border: 1px solid #DCE5EE;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 18px 50px rgba(6, 25, 55, .28);
	text-align: center;
}
.mgk-logout-dialog__panel h2 {
	margin: 0;
	color: #061937;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}
.mgk-logout-dialog__panel p {
	margin: 24px 0;
	color: #718096;
	font-size: 15px;
	line-height: 1.5;
}
.mgk-logout-dialog__actions {
	display: flex;
	justify-content: center;
	gap: 12px;
}
.mgk-logout-dialog__button {
	min-width: 140px;
	height: 44px;
	padding: 0 24px;
	border-radius: 8px;
	font: 500 15px/1 inherit;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, opacity .15s;
}
.mgk-logout-dialog__button--cancel {
	border: 1px solid #1769FF;
	background: #fff;
	color: #1769FF;
}
.mgk-logout-dialog__button--confirm {
	border: 1px solid #1769FF;
	background: #1769FF;
	color: #fff;
}
.mgk-logout-dialog__button:hover { opacity: .88; }
.mgk-logout-dialog__button:focus-visible {
	outline: 3px solid rgba(23, 105, 255, .25);
	outline-offset: 2px;
}
.mgk-logout-dialog__button:disabled {
	cursor: wait;
	opacity: .65;
}
@media (max-width: 480px) {
	.mgk-logout-dialog__panel { padding: 30px 20px 24px; border-radius: 18px; }
	.mgk-logout-dialog__panel p { margin: 18px 0 22px; }
	.mgk-logout-dialog__actions { gap: 10px; }
	.mgk-logout-dialog__button { min-width: 0; flex: 1; padding: 0 12px; }
}

/* ════════════════════════════════════════════════════════════════════════════
 * BATCH 1 — Shopping funnel, MOBILE APP SKIN
 * (Categories · Search · Flash Deals · PDP · Cart)
 *
 * Source: UI-html/FreshMart Mobile Standalone(1).html, one screen per
 * data-screen-label. Same 640px breakpoint and same --fm-* palette as the
 * S-001 home skin above (declared on :root inside that media query, so it is
 * in scope here and absent on desktop). DESKTOP AND TABLET ARE UNTOUCHED:
 * every rule below lives inside max-width: 640px and is scoped to a funnel
 * page's own block, never to a bare .mgk-prod / .mgk-btn used site-wide.
 *
 * Where the mockup and the real page disagree, the mockup wins (agreed) — with
 * one deliberate exception, the cart's GST line, which is a statutory
 * requirement on a Singapore tax invoice and is kept and restyled instead of
 * hidden. Marked "GST EXCEPTION" at the rule that keeps it.
 * ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

	/* ── 101 Categories — chip filter strip ──────────────────────────────
	   Mockup: a horizontally scrolling row of 40px-tall pill chips on a white
	   card with a hairline bottom border; the active chip is blue-filled. Desktop
	   is now a chip row too, but a different one (navy fill, grey #F1F5F9 resting
	   state, count badge, sort control alongside), so the phone's own values are
	   still restated in full here rather than inherited. */
	.mgk-coltabs { border-bottom: 1px solid var(--fm-line); }
	/* The sort control stays visible on the phone. It used to be hidden here
	   because the retired Category List page carried its own sort <select> in the
	   product bar below (.mgk-catlistprod__sort) and two on one screen read as a
	   bug; that page and its bar are gone, so this is now the ONLY way to sort on
	   a phone. It sits on its own line — the row has no space for both at this
	   width — BELOW the chips, which is the mockup's Categories screen: chip strip
	   first, then a row holding the product count on the left and Sort on the
	   right. (Flash Deals puts its sort ABOVE the chips, but that screen leads with
	   a countdown rather than a chip strip — the two are not the same layout.)

	   No `order` here: the markup is already chips-then-sort, so the phone follows
	   the DOM. An earlier revision flipped it with order:1/2 on the assumption
	   that sort belonged on top — the mockup says otherwise. */
	.mgk-coltabs__inner { flex-wrap: wrap; }
	/* Count on the left, Sort on the right, sharing the line below the chips —
	   the chip row above takes width:100% so it forces the wrap, then these two
	   sit together and margin-left:auto on the sort pushes them apart. */
	.mgk-coltabs__count-line {
		display: block; margin: 0;
		padding: 12px 0 12px var(--mgk-pad-x); box-sizing: border-box;
		font-size: 13px; font-weight: 600; color: var(--fm-muted);
		white-space: nowrap;
	}
	.mgk-coltabs__sort { margin-left: auto; }
	.mgk-coltabs__inner {
		/* Right-edge bleed only, so the last chip can scroll off-screen while
		   the first stays on the 16px gutter. NOTE these boxes are content-box
		   (the global border-box is scoped to .mgk-fm *): a negative margin
		   must be paid back as padding on the SAME side, or the box grows wider
		   than its parent and overflow-x scrolls the left gutter out of view —
		   the bug the home scrollers had. */
		/* box-sizing is the fix that lets padding on BOTH sides coexist with a
		   full-width box: without it these elements are content-box (the global
		   border-box only covers .mgk-fm *) and the 2×16px padding would be
		   ADDED to the width, overflowing the viewport. */
		box-sizing: border-box;
		gap: 8px; padding: 12px var(--mgk-pad-x);
		width: 100%; margin: 0; max-width: none;
	}
	/* The chip row takes the full width of its own line and owns the scrolling
	   (desktop already scrolls it — this just resets the gap to the phone's 8px). */
	.mgk-coltabs__tabs { gap: 8px; width: 100%; }
	.mgk-coltabs__tab {
		flex: 0 0 auto; height: 40px; padding: 0 14px;
		border: 1.5px solid #D0D5DD; border-radius: 20px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 13px; font-weight: 700; gap: 7px;
		white-space: nowrap;
	}
	/* is-active-m and is-active now always travel together (a category is always
	   selected — see category-list-tabs.php), but the phone keeps styling off
	   is-active-m so its blue fill wins over desktop's navy regardless of which
	   class the template happens to emit. */
	.mgk-coltabs__tab.is-active,
	.mgk-coltabs__tab.is-active-m {
		background: var(--fm-blue); border-color: var(--fm-blue); color: #FFFFFF;
	}
	.mgk-coltabs__icon { display: block; font-size: 15px; line-height: 1; }
	/* The count is noise at chip size — the mockup's chips are icon + name.
	   "All Categories" goes too: the mockup opens on a real category and offers
	   the full list through the burger chip below instead. */
	.mgk-coltabs__count { display: none; }

	/* "All Categories" becomes the mockup's leading 40px burger chip, reduced to
	   its icon so the row starts with a glyph instead of a wide word. The label
	   stays in the DOM (visually collapsed) so the control keeps an accessible
	   name.

	   gap: 0 is what actually centres the glyph. The shared .mgk-coltabs__tab rule
	   sets gap: 7px for its icon+name chips; here the collapsed label is still a
	   flex item, so that gap was reserved BETWEEN the glyph and the zero-width
	   label and shoved the glyph 3px left of centre inside the circle. */
	/* display must be restated: the base rule hides this chip entirely (desktop
	   shows category chips only), so width/padding alone would leave it invisible. */
	.mgk-coltabs__tab--all {
		display: inline-flex; width: 40px; padding: 0;
		align-items: center; justify-content: center; gap: 0;
		/* relative so the absolutely-positioned label below is contained by this
		   chip — the base .mgk-coltabs__tab rule is static, so without this the
		   label would anchor to whatever positioned ancestor it found (or the
		   page) and could drag scrollable width with it. */
		position: relative;
	}
	.mgk-coltabs__tab--all .mgk-coltabs__label {
		/* position:absolute takes the label out of the flex flow entirely, so it
		   can neither contribute width nor a gap. text-indent alone left it as a
		   participating item. */
		position: absolute; width: 1px; height: 1px;
		overflow: hidden; white-space: nowrap; clip-path: inset(50%);
	}
	/* flex, not block: as a block the 16px SVG sat in a 20px line box (line-height
	   from the chip's font), making the glyph 21px tall and 2px off centre
	   vertically. A flex box with line-height:0 wraps the SVG exactly. */
	.mgk-coltabs__tab--all .mgk-coltabs__burger {
		display: flex; align-items: center; justify-content: center;
		width: 16px; height: 16px; line-height: 0;
	}

	/* TWO widgets share the .mgk-coltabs class with DIFFERENT markup:
	     pages/category-list-tabs.php → __inner > __tabs > __tab   (has a wrapper)
	     pages/collection-tabs.php    → __inner > __tab           (no wrapper)
	   Everything above styles the wrapper (.mgk-coltabs__tabs) as the scroller, so
	   on the wrapper-less variant (Fresh Deal, S-004) nothing owned the scrolling
	   and `flex-wrap: wrap` above stacked 9 chips into 4 rows, 209px tall.

	   :has() picks out just that variant — a direct-child .mgk-coltabs__tab is
	   the structural signature of the wrapper-less markup — so __inner itself
	   becomes the scroller there and the wrapper case is left exactly as-is.
	   Fixed in CSS rather than by adding a wrapper to collection-tabs.php,
	   because that partial's markup is shared with the desktop layout. */
	.mgk-coltabs__inner:has(> .mgk-coltabs__tab) {
		flex-wrap: nowrap;
		overflow-x: auto; overflow-y: hidden;
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
		/* Right-edge bleed only, matching .mgk-coltabs__tabs: the last chip can
		   scroll off-screen while the first keeps the 16px gutter. The negative
		   margin is paid back as padding on the SAME side — with border-box set
		   above, that keeps the box from outgrowing the viewport. */
		margin-right: calc(var(--mgk-pad-x) * -1);
		padding-right: var(--mgk-pad-x);
	}

	/* ── 103 Search results ──────────────────────────────────────────────
	   Mockup: a result count line, then a TWO-COLUMN card grid — photo on top,
	   name, unit, then price with a round "+" beside it. Nothing else: no sort,
	   no filters, no facet pills (confirmed absent from the design), no
	   pagination, and no "Today's Fresh Picks" block. Those last two are dropped
	   further down this section.

	   Everything here is scoped to .mgk-shop / .mgk-freshpicks / .mgk-fbt.
	   .mgk-grid and .mgk-prod are shared with a dozen other pages and must never
	   be styled bare. */
	/* .mgk-section.mgk-shop, not bare .mgk-shop: the desktop full-bleed rule is
	   (0,2,0) and sets padding-left/right:24px, which would beat this (0,1,0)
	   selector and replace the phone's 16px --mgk-pad-x gutter. */
	.mgk-section.mgk-shop { padding: 12px var(--mgk-pad-x) 16px; box-sizing: border-box; }
	.mgk-shop__grid, .mgk-shop__main { gap: 12px; }
	/* Facet controls the mockup does not have. The sidebar is already hidden on
	   this breakpoint by the theme's own rules; these are the in-page ones. */
	.mgk-shop__quicktoggles, .mgk-shop__pills, .mgk-shop__aside { display: none; }

	.mgk-shop__resultheading { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--fm-ink); }
	.mgk-shop__count { font-size: 14px; font-weight: 600; color: var(--fm-ink-3); }

	/* Two columns regardless of the column count the widget was configured
	   with (--1 … --6), which is a desktop choice. */
	.mgk-shop .mgk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

	.mgk-shop .mgk-prod, .mgk-freshpicks .mgk-prod, .mgk-fbt .mgk-prod {
		border: 1px solid var(--fm-line); border-radius: 14px;
		background: #FFFFFF; box-shadow: none; overflow: hidden;
	}
	.mgk-shop .mgk-prod:hover, .mgk-freshpicks .mgk-prod:hover, .mgk-fbt .mgk-prod:hover {
		box-shadow: none; transform: none;
	}
	/* aspect-ratio/min-height reset alongside the phone's fixed 100px well: the
	   desktop rule near .mgk-products (.mgk-shop/.mgk-freshpicks .mgk-prod__media,
	   3/2) has the SAME (0,2,0) specificity, so height is settled by source order
	   but its aspect-ratio and min-height would otherwise still apply here and
	   fight the 100px. */
	.mgk-shop .mgk-prod__media, .mgk-freshpicks .mgk-prod__media, .mgk-fbt .mgk-prod__media { height: 100px; aspect-ratio: auto; min-height: 0; }
	.mgk-shop .mgk-prod:hover .mgk-prod__img,
	.mgk-freshpicks .mgk-prod:hover .mgk-prod__img, .mgk-fbt .mgk-prod:hover .mgk-prod__img { transform: none; }
	/* In the mockup the price and the "+" share the card's last row. In this
	   markup the 'wide' CTA (__add-wide / __wish-wide) is a SIBLING of __foot,
	   not a child, so __foot is dissolved with display:contents and the body
	   itself becomes the grid that lays out name / unit / price + button —
	   otherwise the button drops onto a line of its own below the price. */
	/* The action column is sized explicitly (40px) rather than 'auto': the
	   button's own width comes from a ::after glyph on a font-size:0 box, which
	   auto-sizing measures as 0 and collapses. */
	.mgk-shop .mgk-prod__body, .mgk-freshpicks .mgk-prod__body, .mgk-fbt .mgk-prod__body {
		display: grid; grid-template-columns: minmax(0, 1fr) 40px;
		align-items: center; column-gap: 8px; row-gap: 6px; padding: 10px;
	}
	.mgk-shop .mgk-prod__foot, .mgk-freshpicks .mgk-prod__foot, .mgk-fbt .mgk-prod__foot { display: contents; }
	/* Cert chips are not on the mockup's result card. */
	.mgk-shop .mgk-prod__badges, .mgk-freshpicks .mgk-prod__badges, .mgk-fbt .mgk-prod__badges { display: none; }
	/* Name spans both columns; price and button share the row below it. */
	.mgk-shop .mgk-prod__name, .mgk-freshpicks .mgk-prod__name, .mgk-fbt .mgk-prod__name {
		grid-column: 1 / -1;
		font-size: 13.5px; font-weight: 600; color: var(--fm-ink);
		line-height: 1.3; min-height: 35px; margin: 0;
	}
	/* Price and button are pinned to the same grid row explicitly. Auto-placement
	   would put the price in row 2 / column 1 and then wrap the button to a row 3
	   of its own, because __badges and __foot's display:contents make the item
	   order hard to predict. Row 2 is "the row after the name". */
	.mgk-shop .mgk-prod__price, .mgk-freshpicks .mgk-prod__price, .mgk-fbt .mgk-prod__price {
		grid-column: 1; grid-row: 2;
		display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
		font-size: 16px; font-weight: 700; color: var(--fm-ink);
		font-variant-numeric: tabular-nums;
	}
	/* Unit on its own line above the price, grey — as in the mockup. It is
	   nested inside __price in the shared markup, so order pulls it up. */
	.mgk-shop .mgk-prod__unit, .mgk-freshpicks .mgk-prod__unit, .mgk-fbt .mgk-prod__unit {
		order: -1; flex: 1 1 100%; margin: 0;
		font-size: 12px; font-weight: 500; color: var(--fm-muted);
	}
	.mgk-shop .mgk-prod__was, .mgk-freshpicks .mgk-prod__was, .mgk-fbt .mgk-prod__was {
		margin: 0; font-size: 11.5px; font-weight: 500;
		color: #98A2B3; text-decoration: line-through;
	}
	.mgk-shop .mgk-prod__pct, .mgk-freshpicks .mgk-prod__pct, .mgk-fbt .mgk-prod__pct {
		top: 8px; left: 8px; border-radius: 7px; padding: 3px 6px;
		font-size: 10px; font-weight: 800; background: var(--fm-red);
	}
	.mgk-shop .mgk-prod__tag, .mgk-freshpicks .mgk-prod__tag, .mgk-fbt .mgk-prod__tag {
		top: 8px; right: 8px; border-radius: 9px; padding: 3px 6px;
		font-size: 8px; font-weight: 700; letter-spacing: .4px; background: var(--fm-blue);
	}

	/* The mockup's in-stock action is a 40px round "+", not the theme's
	   full-width "Add to cart" bar. __add-wide is the element prod-card
	   renders for cta_style 'wide' (which Shop/Search pass), so it is the one
	   reshaped — hiding it and revealing __add is not possible, as prod-card
	   renders only one of the two. */
	.mgk-shop .mgk-prod__add-wide, .mgk-freshpicks .mgk-prod__add-wide, .mgk-fbt .mgk-prod__add-wide {
		grid-column: 2; grid-row: 2;
		width: 40px; height: 40px; margin: 0; padding: 0;
		border-radius: 20px; background: var(--fm-blue); color: #FFFFFF;
		font-size: 0; line-height: 1; align-self: center;
	}
	/* font-size:0 hides the "Add to cart" words; ::after draws the "+" glyph the
	   mockup shows. Kept as a pseudo-element so the button's accessible text
	   stays in the DOM for screen readers. */
	.mgk-shop .mgk-prod__add-wide::after,
	.mgk-freshpicks .mgk-prod__add-wide::after, .mgk-fbt .mgk-prod__add-wide::after {
		content: "+"; font-size: 20px; font-weight: 600; line-height: 1;
	}
	.mgk-shop .mgk-prod__add-wide:hover,
	.mgk-freshpicks .mgk-prod__add-wide:hover, .mgk-fbt .mgk-prod__add-wide:hover { background: var(--fm-blue); color: #FFFFFF; }
	.mgk-shop .mgk-prod__add-wide:active,
	.mgk-freshpicks .mgk-prod__add-wide:active, .mgk-fbt .mgk-prod__add-wide:active { transform: scale(.94); }

	/* Out of stock: the white outlined wishlist CTA already spells out the price
	   in its own label ("Add wishlist — S$2.20"), so the separate price line
	   above it is a duplicate. Hiding it lets the button take row 2 — the same
	   row the in-stock card puts its "+" on — so an out-of-stock card lines up
	   with its neighbours instead of running a row taller. */
	/* :has(.mgk-prod__wish-wide) — only drop the price line on cards whose CTA is
	   the wide "Add wishlist — S$X" button that repeats it. prod-card renders
	   either that button OR a bare ♡ icon; on a ♡ card the price line is the only
	   place the price appears, and hiding it there loses the figure entirely. */
	.mgk-shop .mgk-prod.is-oos:has(.mgk-prod__wish-wide) .mgk-prod__price,
	.mgk-freshpicks .mgk-prod.is-oos:has(.mgk-prod__wish-wide) .mgk-prod__price,
	.mgk-fbt .mgk-prod.is-oos:has(.mgk-prod__wish-wide) .mgk-prod__price { display: none; }
	/* NOTE: the unit ("/ pack") is nested inside __price in the shared markup, so
	   it is hidden along with it. That is acceptable here — no out-of-stock
	   product carries a unit in this catalogue, and the wishlist CTA below
	   restates the price anyway. It cannot be lifted back out with CSS alone:
	   a child of a display:none box never becomes a grid item, so re-placing it
	   on row 2 would have no effect and would collide with the CTA there. If a
	   unit on out-of-stock cards is ever needed, move the span out of __price in
	   shared/prod-card.php instead of trying to rescue it here. */

	.mgk-shop .mgk-prod__wish-wide, .mgk-freshpicks .mgk-prod__wish-wide, .mgk-fbt .mgk-prod__wish-wide {
		/* Spans both columns and sits on row 2, where the price used to be. */
		grid-column: 1 / -1; grid-row: 2;
		width: 100%; height: 40px; margin: 0; padding: 0 12px;
		border-radius: 22px; font-size: 12.5px; font-weight: 700;
		background: #FFFFFF; color: var(--fm-ink-2); border: 1.5px solid #D0D5DD;
		align-self: center; box-sizing: border-box;
	}
	.mgk-shop .mgk-prod__oos .mgk-chip--red, .mgk-freshpicks .mgk-prod__oos .mgk-chip--red, .mgk-fbt .mgk-prod__oos .mgk-chip--red {
		background: #FEF3F2; color: #B42318; border: 1px solid #FECDCA;
		font-size: 12px; font-weight: 700; border-radius: 14px; padding: 5px 10px;
	}

	/* "Today's Fresh Picks" is dropped on mobile: the results grid already fills
	   the screen, and a second 10-card block under it just pushed the tab bar
	   further away. Desktop keeps the section — it is a horizontal scroller
	   there, where it costs one row, not ten. The section only ever renders on
	   Search (shop.php gates it on $mgk_on_search_page), so hiding it by its own
	   class cannot affect Shop or Category Landing. */
	.mgk-freshpicks { display: none; }

	/* No pagination on the phone — the results load by infinite scroll instead
	   (mgk-retail.js -> initCatalogInfiniteScroll), so every result is reachable
	   without a pager.

	   NOT scoped to --search any more. It used to be, which paired badly with
	   shop.php's matching gate: Category Landing renders this same widget, so it
	   kept a "1 2 Next ›" pager AND had no infinite scroll. Both are lifted
	   together — hiding the pager here without enabling the scroll there would
	   strand 8 of 20 products per category with no way to reach them. */
	.mgk-shop__pagination { display: none; }
	/* display:block is required, not cosmetic: this element is the sentinel the
	   IntersectionObserver watches, and a display:none node never intersects. It
	   still carries [hidden] until there is something to say, which keeps it out
	   of the accessibility tree without removing it from layout. */
	.mgk-shop__infinite {
		display: block; min-height: 1px;
		margin: 4px 0 0; padding: 10px 0; text-align: center;
		font-size: 12.5px; font-weight: 600; color: var(--fm-muted);
	}

	/* The variant "N options: m · l" line is desktop-only detail. In this grid
	   it lands in the body's action column (a 40px track) and wraps into a tall
	   block that overflows the card — and the "+" already routes a variant
	   product to the PDP, where the options are chosen anyway. */
	.mgk-shop .mgk-prod__options,
	.mgk-freshpicks .mgk-prod__options,
	.mgk-fbt .mgk-prod__options,
	.mgk-products .mgk-prod__options { display: none; }

	/* ── 104 Flash Deals (/sale/) ────────────────────────────────────────
	   Mockup: solid red header band with the campaign name, then a white bar
	   holding "Ends in HH:MM:SS" and a Sort select, then the category chips,
	   then a 2-column deal grid (photo, % tag, name, sold/left progress bar,
	   blue price + struck-through was-price, full-width "Add to cart").
	   The page already has every one of those parts — this is presentation
	   only, no new markup beyond the mobile header band and "Ends in" label. */

	/* The banner photo gives way to the mockup's red band. */
	.mgk-sale__hero { display: none; }
	.mgk-sale__mhero {
		display: block; padding: 16px var(--mgk-pad-x);
		background: #B42318; color: #FFFFFF; box-sizing: border-box;
	}
	.mgk-sale__mhero-title {
		display: block; font-size: 21px; font-weight: 700; letter-spacing: .4px;
	}
	.mgk-sale__mhero-sub {
		display: block; margin-top: 2px; font-size: 13px; opacity: .9; line-height: 1.4;
	}

	/* Filter bar: the clock and the Sort control share one white row above the
	   chips. The theme's 780px rule stacks this column-wise and centres the
	   clock, which is undone here. */
	.mgk-sale__filterbar { border-bottom: 1px solid var(--fm-line); }
	.mgk-sale__filterbar-inner {
		flex-direction: column; align-items: stretch; gap: 0;
		padding: 0; height: auto; box-sizing: border-box; max-width: none;
	}
	/* Row 1 — "Ends in HH:MM:SS", sharing its line with the Sort select that the
	   toolbar rule below lifts up into it. min-height reserves the select's 44px
	   so the lifted box has a row to sit in; without it the clock's own ~20px
	   line box would leave the select overlapping the chips underneath.
	   order 1 puts this first even though the markup has the tabs before it. */
	.mgk-sale__countdown {
		order: 1; display: flex; align-items: center; gap: 6px;
		justify-content: flex-start; margin: 0;
		/* Right padding = the select's 158px + a 10px gap, so the clock's content
		   box ends where the lifted select begins and the two cannot overlap. */
		padding: 8px calc(158px + 10px + var(--mgk-pad-x)) 8px var(--mgk-pad-x);
		box-sizing: border-box; min-height: 60px;
		min-width: 0; overflow: hidden;
	}
	/* One block, not two: an earlier edit added a second .mgk-sale__endsin rule
	   ABOVE this one, where source order made it lose. Merged here instead.
	   The long editable label ("⚡ Flash Sale ends in:") gives way before the
	   clock digits do — the time is the information the row exists for. */
	.mgk-sale__endsin {
		display: inline; font-size: 14px; font-weight: 700; color: var(--fm-ink);
		white-space: nowrap;
		min-width: 0; overflow: hidden; text-overflow: ellipsis;
	}
	/* Inline HH:MM:SS in red, replacing the three stacked HRS/MIN/SEC tiles.
	   flex-none so the digits are never the thing that shrinks. */
	.mgk-sale__clock { gap: 0; align-items: baseline; flex: 0 0 auto; }
	/* height/min-width must be reset explicitly: the desktop segment is an 80px
	   white tile, and inline display alone does not clear those. */
	.mgk-sale__clock-seg {
		display: inline; padding: 0; background: none; border: 0; border-radius: 0;
		min-width: 0; width: auto; height: auto; min-height: 0; box-shadow: none;
	}
	.mgk-sale__clock-num {
		font-size: 14px; font-weight: 700; color: #B42318;
		font-variant-numeric: tabular-nums;
	}
	/* HRS/MIN/SEC captions are redundant once the clock reads as HH:MM:SS. */
	.mgk-sale__clock-unit { display: none; }
	.mgk-sale__clock-sep {
		display: inline; margin: 0 1px; font-size: 14px; font-weight: 700; color: #B42318;
	}

	/* Row 2 — category chips, scrolling, right-edge bleed. */
	/* flex-wrap must be reset to nowrap: the desktop bar wraps its pills onto
	   several lines, but the mockup scrolls them on one row. Without this the
	   chips stack two-deep and overflow-x has nothing to scroll. */
	.mgk-sale__tabs {
		/* order 3 — below BOTH the clock (1) and the Sort row (2). */
		order: 3; gap: 8px; margin: 0; overflow-x: auto; flex-wrap: nowrap;
		padding: 10px var(--mgk-pad-x) 12px; box-sizing: border-box;
		border-top: 1px solid var(--fm-line);
		border-bottom: 1px solid var(--fm-line);
		scrollbar-width: none;
		/* min-width:0 + max-width are what make overflow-x actually scroll. As a
		   flex item its automatic minimum size is its CONTENT width (547px of
		   chips), so without these it simply grows and the whole PAGE scrolls
		   sideways instead of the chip row. */
		flex: 0 1 auto; min-width: 0; max-width: 100%; width: 100%;
	}
	.mgk-sale__tabs::-webkit-scrollbar { display: none; }
	.mgk-sale__tab {
		flex: 0 0 auto; min-height: 40px; padding: 0 16px;
		display: inline-flex; align-items: center; gap: 6px;
		border: 1px solid #D0D5DD; border-radius: 20px; background: #FFFFFF;
		color: var(--fm-ink-2); font-size: 13.5px; font-weight: 700;
		white-space: nowrap;
	}
	.mgk-sale__tab.is-active {
		background: var(--fm-blue-bg); border-color: var(--fm-blue);
		color: var(--fm-blue);
	}

	/* Toolbar / Sort placement.

	   The mockup puts "Ends in HH:MM:SS" and the Sort select together on ONE row,
	   with the chip strip BELOW that row:

	       ┌ Flash Deals (red band) ──────────┐
	       │ Ends in 00:36:18   [Sort:  ▾]    │  ← one row
	       ├──────────────────────────────────┤
	       │ (All 4) (Fresh Meats 2) (Seafood)│  ← chips under it
	       └──────────────────────────────────┘

	   Sort cannot simply be re-`order`ed into the clock row: it lives in
	   .mgk-sale__body > .mgk-sale__toolbar, a DIFFERENT flex container from the
	   clock's .mgk-sale__filterbar-inner, and `order` only sorts siblings. Moving
	   it in PHP would change the desktop layout, which shares this markup.

	   The fix is `display: contents` on the wrappers: it removes a box from the
	   layout and promotes its children one level up. Applied to __filterbar,
	   __filterbar-inner AND __body, the chips, the countdown and the toolbar all
	   land as siblings of one another inside .mgk-sale — which is already
	   `display: flex; flex-direction: column` from its base rule. Only then can
	   `order` interleave them, since order sorts siblings and nothing else.

	   All three wrappers are needed: contents promotes exactly ONE level, so
	   leaving any of them in place would keep its children a level below the
	   others and out of reach of order.

	   `display: contents` is used the same way elsewhere in this file
	   (.mgk-prod__foot in the card grids). */
	.mgk-sale__filterbar,
	.mgk-sale__filterbar-inner,
	.mgk-sale__body { display: contents; }
	/* Countdown (order 1) and toolbar (order 2) are separate flex ITEMS in a
	   column, so they stack. They are pulled onto one line by lifting the toolbar
	   by the clock row's height and giving the clock a right-hand gutter the
	   select then occupies.

	   A first attempt just lifted the toolbar and relied on the clock being short;
	   it overlapped by 10px, because this store's label is the editable
	   "⚡ Flash Sale ends in:" (145px) rather than the mockup's terse "Ends in".
	   The label is Elementor content and must not be rewritten in CSS, so the
	   clock instead reserves space for the select: padding-right equal to the
	   select's width plus a gap, with the text allowed to shrink and ellipsis
	   rather than run underneath it. */
	.mgk-sale__toolbar {
		order: 2;
		padding: 0 var(--mgk-pad-x) 0 0; border: 0;
		margin: -60px 0 0; /* exactly .mgk-sale__countdown's min-height */
		display: flex; align-items: center; justify-content: flex-end;
		box-sizing: border-box; height: 60px;
		position: relative; z-index: 1;
		/* The lifted box spans the full row, so it must not swallow taps aimed at
		   the clock beneath it — only its own controls stay interactive. */
		pointer-events: none;
	}
	.mgk-sale__toolbar > * { pointer-events: auto; }
	.mgk-sale__toolbar-heading { display: none; }
	.mgk-sale__sort { margin-left: auto; }
	.mgk-sale__sort-label { display: none; }
	/* background-color, NOT the `background` shorthand — the shorthand would
	   reset the base rule's caret background-image and bring the cramped native
	   arrow back. Right padding keeps the 12px-inset caret clear of the text. */
	.mgk-sale__sort-select {
		height: 44px; line-height: 20px; border: 1px solid #D0D5DD; border-radius: 12px;
		padding: 0 34px 0 10px; font-size: 14px; font-weight: 600;
		color: var(--fm-ink-2); background-color: #FFFFFF;
	}

	/* The full-width single hero deal is not on the mockup's screen — every deal
	   is an equal card in the 2-up grid.

	   It is RESTYLED to look like a grid card, never hidden. `display: none` was
	   the first attempt and it lost a product: sale.php promotes the first deal of
	   page 1 into this hero and starts the grid at the SECOND deal, so the hero is
	   the only place that product appears. Whenever it happened to be the
	   out-of-stock one, "All Deals 7" rendered 6 cards on mobile and 7 on desktop,
	   and the out-of-stock product was simply gone.

	   The hero's markup now sits inside .mgk-sale__grid (sale.php), where desktop
	   spans it across every column. Here that span is dropped so the wrapper
	   occupies ONE column and the hero becomes the grid's ordinary first cell,
	   pairing up with the next deal instead of standing alone on its own row with
	   dead space beside it.

	   `display: contents` on the wrapper would be the tidier way to let the card
	   itself be the cell, but it cannot be used: the card needs the wrapper's grid
	   cell to size against, and contents would promote it while its own
	   `grid-column` rules no longer apply. */
	.mgk-sale__herodeal-wrap {
		grid-column: auto; padding: 0; display: flex;
	}
	.mgk-sale__herodeal {
		display: flex; flex-direction: column; width: 100%;
		border: 1px solid var(--fm-line); border-radius: 14px; overflow: hidden;
		background: #FFFFFF; box-shadow: 0 6px 16px rgba(16,24,40,.07);
		padding: 0; gap: 0;
	}
	.mgk-sale__herodeal:hover { transform: none; box-shadow: 0 6px 16px rgba(16,24,40,.07); }
	/* Match the grid card's proportions: 108px photo, 10px body.
	   aspect-ratio must be reset to auto explicitly — the desktop rule sets 16/10
	   (the hero is a side-by-side 40%-wide banner there) and it would otherwise
	   still apply here, overriding this fixed 108px height with a width-derived
	   one. min-height:0 is kept for the same reason it was added originally. */
	.mgk-sale__herodeal-media {
		height: 108px; min-height: 0; aspect-ratio: auto; width: auto; flex: 0 0 auto;
	}
	.mgk-sale__herodeal-body { padding: 10px; gap: 6px; }
	.mgk-sale__herodeal-name {
		font-size: 13.5px; font-weight: 600; line-height: 1.3; min-height: 35px; margin: 0;
	}
	.mgk-sale__herodeal-price { font-size: 16px; font-weight: 800; color: var(--fm-blue); }
	.mgk-sale__herodeal-was { font-size: 11px; font-weight: 600; }
	/* One line: price + struck-through was-price, like the grid cards. The desktop
	   hero also carries a "SAVE $X" chip here, which wrapped onto a second row at
	   this width and made the card 48px taller than its neighbours — the grid
	   cards show the saving as the corner % tag instead, which this card has too. */
	.mgk-sale__herodeal-prices {
		gap: 6px; margin: 0; flex-wrap: nowrap; align-items: baseline;
	}
	.mgk-sale__herodeal-prices .mgk-chip--save { display: none; }
	.mgk-sale__herodeal-tag {
		top: 8px; left: 8px; border-radius: 6px; padding: 3px 6px;
		font-size: 11px; font-weight: 800;
	}
	/* Full-width CTA, same as the grid cards' "Add to cart". */
	.mgk-sale__herodeal-add {
		width: 100%; height: 38px; padding: 0; border-radius: 20px;
		font-size: 12.5px; font-weight: 800;
	}

	/* Dissolving the wrappers promoted their children into .mgk-sale, where the
	   default order is 0 — which would place the deal grid ABOVE the ordered
	   clock/sort/chips. So the promoted content blocks are pushed to order 4.

	   They must be named directly rather than caught by a `.mgk-sale > *:not(…)`
	   sweep: such a sweep also matches __filterbar and __body themselves, and
	   `order` on a `display: contents` box is IGNORED (the box is not a flex item)
	   while its children keep the default 0 — which put the whole grid back at the
	   top. That was the bug this comment replaces.

	   .mgk-sale__herodeal-wrap is deliberately NOT in this list: it now lives
	   inside .mgk-sale__grid, so an order here would reorder it against its GRID
	   siblings and push the hero below the other deals instead of leading them. */
	.mgk-sale__grid,
	.mgk-sale__toolbar ~ *:not(.mgk-sale__herodeal-wrap) { order: 4; }
	/* The red mobile hero band stays at the very top. */
	.mgk-sale__mhero { order: 0; }
	.mgk-sale__grid { gap: 12px; padding: 12px var(--mgk-pad-x); box-sizing: border-box; }
	/* Grid deal cards render via shared/prod-card.php (.mgk-prod) now, styled by
	   its own mobile rules elsewhere — the old standalone .mgk-sale__deal* card
	   skin above (media/body/badges/name/prices/price/was, add, wish, ribbon) is
	   gone. .mgk-sale__deal-tag is kept: the untouched Hero Deal still carries it
	   (alongside .mgk-sale__herodeal-tag) — see sale.php. */
	.mgk-sale__deal-tag {
		top: 8px; left: 8px; border-radius: 6px; padding: 3px 6px;
		font-size: 11px; font-weight: 800; background: var(--fm-red); color: #FFFFFF;
	}

	/* ── 105 Product detail (/product-detail/) ───────────────────────────
	   Mockup: cert chips in a row ABOVE a 210px rounded photo, then
	   "category · SKU", a 20px name, a 26px price with the unit beside it,
	   an "Incl. GST" line, a reviews button, the dashed-amber offers card,
	   the Delivery / Click & Collect card, and the weight grid — all one
	   column at 16px gutters. */
	/* .mgk-section.mgk-pdp so this beats the (0,2,0) desktop full-bleed rule,
	   which would otherwise re-add its 24px side padding here. */
	.mgk-section.mgk-pdp { padding: 0; }
	.mgk-pdp__grid {
		grid-template-columns: minmax(0, 1fr); gap: 0;
		padding: 16px var(--mgk-pad-x); box-sizing: border-box;
		border-bottom: 1px solid var(--fm-line);
	}
	.mgk-pdp__media { gap: 10px; }
	/* 210px per the mockup, and min-height as well as height: the placeholder
	   glyph (.mgk-pdp__main-img--ph) is not an <img>, so it does not inherit the
	   wrapper's height and would otherwise collapse the box to ~90px. */
	.mgk-pdp__main {
		height: 210px; min-height: 210px; border-radius: 14px;
		border: 0; overflow: hidden; background: #F5F6F8;
	}
	.mgk-pdp__main-img--ph { width: 100%; height: 100%; font-size: 64px; }

	.mgk-pdp__media-tags { left: 10px; bottom: 10px; right: 10px; }
	.mgk-pdp__media-tag { font-size: 11px; padding: 4px 9px; }

	.mgk-pdp__info { gap: 8px; }
	/* "brand · origin · SKU" line under the name (.mgk-pdp__sku — NOT
	   .mgk-pdp__prodinfo, which is the wrapper around the whole Product
	   Information block further down the page). */
	.mgk-pdp__sku { font-size: 12.5px; font-weight: 600; color: var(--fm-muted); }
	/* The mockup goes straight from the offers/availability cards into the
	   accordion, with no "Product Information" heading over it — each accordion
	   header already names its own section. */
	.mgk-pdp__prodinfo { margin-top: 8px; }
	.mgk-pdp__prodinfo-title { display: none; }
	.mgk-pdp__name {
		font-size: 20px; font-weight: 700; color: var(--fm-ink); line-height: 1.3;
	}
	.mgk-pdp__price-row { align-items: center; gap: 10px; }
	.mgk-pdp__price {
		font-size: 28px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-pdp__price--sale { color: var(--fm-red); }
	.mgk-pdp__price-meta { gap: 5px; }
	.mgk-pdp__price-was { font-size: 11px; color: var(--fm-ink-3); }

	/* Offers card: dashed amber border on a pale amber fill. */
	.mgk-pdp__offers {
		border: 1px dashed #F79009; background: #FFFAEB;
		border-radius: 12px; padding: 12px 14px;
	}
	.mgk-pdp__offers-title {
		font-size: 12px; font-weight: 700; color: #B54708; letter-spacing: .6px;
	}
	.mgk-pdp__offer-line {
		font-size: 13.5px; color: var(--fm-ink-2); line-height: 1.55;
	}

	/* Delivery / Click & Collect: one bordered card, rows split by a hairline. */
	.mgk-pdp__avail {
		border: 1px solid var(--fm-line); border-radius: 12px; overflow: hidden;
	}
	.mgk-pdp__avail-row {
		padding: 12px 14px; border-bottom: 1px solid var(--fm-line);
		display: flex; align-items: center; justify-content: space-between; gap: 10px;
	}
	.mgk-pdp__avail-row:last-child { border-bottom: 0; }
	.mgk-pdp__avail-title { font-size: 14px; font-weight: 700; color: var(--fm-ink); }
	.mgk-pdp__avail-sub { font-size: 12.5px; color: var(--fm-muted); margin-top: 2px; }

	/* Weight picker: two per row, left-aligned label + serves line. */
	.mgk-pdp__weightgrid .mgk-weight__opts { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.mgk-pdp__weightgrid .mgk-weight__opt {
		min-height: 64px; border-radius: 12px; border-width: 1.5px;
		padding: 8px 10px; text-align: left; align-items: flex-start;
	}

	/* ── Accordion ───────────────────────────────────────────────────────
	   Mockup: full-bleed white block, each header a 52px row with a hairline
	   under it, no card border or radius around the group. */
	.mgk-pdp__acc {
		margin-top: 8px; border: 0; border-radius: 0; background: #FFFFFF;
		box-shadow: none; padding: 0; gap: 0;
	}
	.mgk-pdp__acc-item { border: 0; border-radius: 0; }
	.mgk-pdp__acc-head {
		min-height: 52px; padding: 0 var(--mgk-pad-x);
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
		border-bottom: 1px solid #F2F4F7; background: none;
	}
	.mgk-pdp__acc-item:last-child .mgk-pdp__acc-head { border-bottom: 0; }
	.mgk-pdp__acc-item[open] .mgk-pdp__acc-head { border-bottom: 1px solid #F2F4F7; }
	.mgk-pdp__acc-body { padding: 4px var(--mgk-pad-x) 16px; }
	.mgk-pdp__acc-desc { font-size: 14px; color: var(--fm-ink-2); line-height: 1.6; }

	/* Spec table: label column on a grey ground, value beside it. The theme's
	   own 720px rule stacks these into two lines, which is why flex-direction
	   has to be restated here rather than just tweaked. */
	.mgk-pdp__acc-table {
		margin-top: 12px; border: 1px solid var(--fm-line); border-radius: 12px;
		overflow: hidden;
	}
	.mgk-pdp__acc-row {
		display: flex; flex-direction: row; gap: 0; padding: 0;
		border-bottom: 1px solid #F2F4F7; background: #FFFFFF;
	}
	.mgk-pdp__acc-row:last-child { border-bottom: 0; }
	.mgk-pdp__acc-row.is-alt { background: #FFFFFF; }
	.mgk-pdp__acc-row-label {
		flex: 0 0 132px; padding: 10px 12px; box-sizing: border-box;
		background: #F7F8FA; color: var(--fm-muted);
		font-size: 13px; font-weight: 600;
	}
	.mgk-pdp__acc-row-val {
		flex: 1 1 auto; min-width: 0; padding: 10px 12px; box-sizing: border-box;
		color: var(--fm-ink); font-size: 13px; font-weight: 600;
	}

	/* ── "Similar products" ──────────────────────────────────────────────
	   The related-products grid stands in for the mockup's "Similar products".
	   Scoped with `body:has(.mgk-pdp)` so only the PDP's copy is stripped back —
	   .mgk-products is the same widget the HOME page uses, where the home skin
	   deliberately keeps the cert chips and corner tags.
	   Mockup card: 96px photo, name, price + round "+". Nothing else. */
	body:has(.mgk-pdp) .mgk-products {
		padding: 16px var(--mgk-pad-x); box-sizing: border-box;
	}

	/* One row, swipe sideways for the rest — the same mechanism the desktop cart
	   uses for "Offer for you" (.mgk-fbt__grid, ~line 1438): flex instead of
	   grid, overflow-x auto, scrollbar hidden, x-proximity snap, plus the same
	   prev/next arrow pair in the heading row.

	   One difference from that block, forced by the markup: .mgk-grid is
	   `display: grid` from the base theme (line 29) and gets
	   `grid-template-columns: repeat(2, 1fr)` at 720px, so `display: flex` and
	   `grid-template-columns: none` must both be stated here to drop the column
	   track — otherwise the flex-basis below is ignored and the cards stay in a
	   2-up grid.

	   The 78vw card basis deliberately peeks the next card past the viewport
	   edge: with a round 2-up the row would look like a complete grid and
	   nothing would suggest it scrolls.

	   The negative right margin + matching padding lets the row bleed to the
	   screen edge while its first card still lines up with the section's
	   --mgk-pad-x gutter. */
	body:has(.mgk-pdp) .mgk-products .mgk-grid {
		display: flex; gap: 12px;
		grid-template-columns: none;
		overflow-x: auto; overflow-y: hidden;
		margin-right: calc(var(--mgk-pad-x) * -1);
		padding-right: var(--mgk-pad-x);
		scroll-behavior: smooth; scroll-snap-type: x proximity;
		scrollbar-width: none; -ms-overflow-style: none;
		-webkit-overflow-scrolling: touch;
	}
	body:has(.mgk-pdp) .mgk-products .mgk-grid::-webkit-scrollbar { display: none; }

	/* Heading row: title on the left, the two round arrows on the right — the
	   desktop cart's "Offer for you" layout. The generic [data-mgk-scroll]
	   handler in mgk-retail.js steps the row by exactly one card pitch, read
	   from the DOM, so it already matches the 78vw basis with no extra JS.

	   "View all" and the sub-line are dropped: the mockup's Similar block has
	   neither, and with swipe + arrows the link is a redundant third way out of
	   a row the shopper can now browse in place. */
	body:has(.mgk-pdp) .mgk-products .mgk-sh {
		display: flex; flex-direction: row; align-items: center;
		justify-content: space-between; gap: 12px; margin-bottom: 10px;
	}
	body:has(.mgk-pdp) .mgk-products .mgk-sh__sub,
	body:has(.mgk-pdp) .mgk-products .mgk-products__cta { display: none; }
	body:has(.mgk-pdp) .mgk-products .mgk-products__arrows {
		display: flex; flex: 0 0 auto;
	}
	/* 32px hit target is below the 44px comfortable minimum, so the arrows are a
	   convenience on top of swipe, never the only way through the row. */
	body:has(.mgk-pdp) .mgk-products .mgk-freshpicks__arrow {
		width: 32px; height: 32px; background: #F2F4F7;
	}
	body:has(.mgk-pdp) .mgk-products .mgk-freshpicks__arrow:active { transform: scale(.94); }
	body:has(.mgk-pdp) .mgk-products .mgk-grid .mgk-prod {
		flex: 0 0 180px; min-width: 0;
		scroll-snap-align: start;
	}
	body:has(.mgk-pdp) .mgk-products .mgk-prod__media { height: 132px; }
	body:has(.mgk-pdp) .mgk-products .mgk-prod__badges,
	body:has(.mgk-pdp) .mgk-products .mgk-prod__pct,
	body:has(.mgk-pdp) .mgk-products .mgk-prod__tag,
	body:has(.mgk-pdp) .mgk-products .mgk-prod__saletag { display: none; }
	body:has(.mgk-pdp) .mgk-products .mgk-prod__name {
		font-size: 13.5px; font-weight: 600; line-height: 1.3; min-height: 35px;
	}
	/* Out of stock: hide the price line ONLY when the card's CTA is the wide
	   "Add wishlist — S$X" button, which repeats the figure. These cards use the
	   plain ♡ icon (prod-card renders one or the other, never both), so the price
	   line is the only place the price appears and must stay — :has() checks
	   which control this particular card actually got. */
	body:has(.mgk-pdp) .mgk-products .mgk-prod.is-oos:has(.mgk-prod__wish-wide) .mgk-prod__price { display: none; }

	/* ── Pinned buy bar ──────────────────────────────────────────────────
	   The mockup pins the buy controls to the bottom of the SCREEN: a 40px round
	   wishlist button, a pill stepper, then a full-width "Add · $38.00".

	   position:fixed, not sticky. Sticky was tried first and does not work here:
	   a sticky box can only stick within its own containing block, and this row
	   lives inside .mgk-pdp__info (449px tall) on a 1820px page — so it scrolled
	   away for good about a third of the way down. Fixed anchors it to the
	   viewport, which is what the design shows.

	   bottom is the tab bar's height, so the two stack instead of overlapping. */
	.mgk-pdp__buyrow {
		position: fixed; left: 0; right: 0; bottom: 74px; z-index: 40;
		display: flex; flex-wrap: nowrap; align-items: center; gap: 10px;
		margin: 0; padding: 12px var(--mgk-pad-x);
		background: #FFFFFF; border-top: 1px solid var(--fm-line);
		box-shadow: 0 -2px 10px rgba(16,24,40,.06);
		box-sizing: border-box;
	}
	/* The stepper becomes the mockup's outlined pill. */
	.mgk-pdp__qty { flex: 0 0 auto; gap: 0; }
	.mgk-pdp__buyrow .mgk-qty {
		height: 40px; border: 1.5px solid #D0D5DD; border-radius: 20px;
		background: #FFFFFF; padding: 0; gap: 0; overflow: hidden;
	}
	.mgk-pdp__buyrow .mgk-qty__btn {
		width: 40px; height: 40px; border: 0; border-radius: 0;
		background: none; color: var(--fm-ink-2); font-size: 20px;
	}
	.mgk-pdp__buyrow .mgk-qty__val {
		min-width: 24px; text-align: center;
		font-size: 16px; font-weight: 700; color: var(--fm-ink);
	}
	/* Primary action takes the rest of the row; the secondary "Buy now" is not
	   on the mockup's bar and would not fit beside it on a 390px screen. */
	.mgk-pdp__cta { flex: 1 1 auto; width: auto; min-width: 0; gap: 10px; }
	.mgk-pdp__buynow { display: none; }
	.mgk-pdp__cta .mgk-btn {
		flex: 1 1 auto; width: auto; height: 40px; min-height: 40px; padding: 0 14px;
		border-radius: 25px; font-size: 16px; font-weight: 700;
		background: var(--fm-blue); color: #FFFFFF; border: 0;
	}
	.mgk-pdp__cta .mgk-btn:active { transform: scale(.98); }
	/* Out of stock: the same button becomes "Add to wishlist" in the wishlist red
	   the rest of the theme uses for that action (--mgk-wish-remove, the colour
	   desktop gives this control once the item is saved) rather than the blue
	   add-to-cart. No separate ♡ icon button is added — this row IS the wishlist
	   action when the product cannot be bought. */
	.mgk-pdp__cta .mgk-pdp__wishlist-btn {
		background: var(--mgk-wish-remove); color: #FFFFFF; border: 0;
	}
	.mgk-pdp__cta .mgk-pdp__wishlist-btn:hover,
	.mgk-pdp__cta .mgk-pdp__wishlist-btn.is-active {
		background: var(--mgk-wish-remove); color: #FFFFFF;
	}
	/* Nothing to step through when the product is out of stock. */
	.mgk-pdp__buyrow:has(.mgk-pdp__wishlist-btn) .mgk-pdp__qty { display: none; }
	/* The fixed bar is out of flow, so the page needs its height reserved or the
	   last row of "Similar products" sits underneath it. 64px bar + the 74px tab
	   bar the home skin already reserves = 138px; only the extra 64 is added
	   here, on top of that existing padding-bottom. */
	body:has(.mgk-pdp__buyrow) { padding-bottom: 138px; }

	/* ── 106 Cart (/fm-cart/) ────────────────────────────────────────────
	   Mockup: a Cart / Wishlist tab bar with the item count on the right, one
	   rounded card holding the line items (60px thumb, name, meta, line total,
	   a −/qty/+ stepper and a red "Remove"), then the "Order summary" card
	   (Subtotal, Delivery fee, free-delivery notice, a ruled Total row, and a
	   full-width pill "Checkout"), then "Offers for you" as a 2-up grid.

	   GST: the summary's tax line is left to the page's own logic. This store
	   is not GST-registered (woocommerce_calc_taxes = no), so
	   mgk_cart_totals_view() correctly prints "Prices are not subject to GST";
	   if GST is switched on it prints the inclusive-GST breakdown instead.
	   Either way it is a statutory disclosure and is never hidden — the one
	   agreed exception to following the mockup exactly. */
	.mgk-cart { padding: 12px var(--mgk-pad-x) 16px; box-sizing: border-box; }
	.mgk-cart__back { font-size: 13px; margin-bottom: 6px; }

	.mgk-cart__tabs { margin-bottom: 0; border-bottom: 1px solid var(--fm-line); }
	.mgk-cart__tab-buttons { gap: 18px; }
	.mgk-cart__tab {
		padding: 14px 2px; font-size: 15px; font-weight: 600;
		color: #98A2B3; border-bottom-width: 2.5px;
	}
	.mgk-cart__tab.is-active {
		color: var(--fm-ink); font-weight: 700; border-bottom-color: var(--fm-blue);
	}
	.mgk-cart__tabs-count { font-size: 13px; font-weight: 600; color: var(--fm-muted); }

	/* One column: items card, then summary card, then offers. */
	.mgk-cart__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }

	.mgk-cart__items {
		border: 1px solid var(--fm-line); border-radius: 16px; overflow: hidden;
		margin-top: 14px;
	}
	.mgk-cartrow {
		gap: 12px; padding: 14px; align-items: flex-start;
		border-bottom: 1px solid #F2F4F7;
	}
	.mgk-cartrow__media {
		width: 60px; height: 60px; border-radius: 10px;
	}
	.mgk-cartrow__name { font-size: 14px; font-weight: 600; line-height: 1.35; }
	.mgk-cartrow__sub { font-size: 12.5px; font-weight: 600; margin-top: 2px; }

	/* Quantity stepper: three 40px controls, as drawn — big enough to hit. */
	.mgk-cartrow .mgk-qty { gap: 2px; background: none; border: 0; padding: 0; }
	.mgk-cartrow .mgk-qty__btn {
		width: 40px; height: 40px; border: 1px solid #D0D5DD; border-radius: 10px;
		background: #FFFFFF; color: var(--fm-ink-2); font-size: 18px;
	}
	.mgk-cartrow .mgk-qty__btn:active { background: #F2F4F7; }
	.mgk-cartrow .mgk-qty__val {
		min-width: 32px; text-align: center;
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-cartrow__remove {
		color: #B42318; font-size: 12.5px; font-weight: 700;
		padding: 8px 0 0; min-height: 32px;
	}

	/* Summary card. */
	.mgk-cart__aside { gap: 14px; }
	/* :first-child raises specificity to 3 classes so it beats the base
	   .mgk-cart__aside > .mgk-card rule's own padding and radius. */
	.mgk-cart__aside > .mgk-card,
	.mgk-cart__aside > .mgk-card:first-child {
		border: 1px solid var(--fm-line); border-radius: 16px; padding: 16px;
		box-shadow: none;
	}
	.mgk-cart__summary-title {
		font-size: 17px; font-weight: 700; color: var(--fm-ink); margin: 0 0 12px;
	}
	.mgk-cart__freeship {
		border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600;
	}
	.mgk-cart__aside .mgk-btn--cta, .mgk-cart__checkout {
		width: 100%; height: 40px; border-radius: 25px;
		font-size: 16px; font-weight: 700;
		background: var(--fm-blue); color: #FFFFFF; border: 0;
	}
	.mgk-cart__aside .mgk-btn--cta:active { transform: scale(.98); }
	.mgk-cart__aside-secure { font-size: 12px; color: var(--fm-muted); margin-top: 8px; }

	/* ── "Offer for you" — one swipeable row ─────────────────────────────
	   Same mechanism as the PDP's "Similar products" row (~line 6962): one line
	   of cards, swipe sideways for the rest, with the prev/next arrow pair in
	   the heading.

	   This used to be a capped 2×2 grid, which hid every recommendation past
	   the fourth — the row carries up to 30. A scroller reaches all of them in
	   the same vertical space, so the cap is gone with the grid.

	   Only the bits the 720px block (line ~2007) doesn't already establish are
	   set here: it makes .mgk-fbt__grid a flex scroller with the snap and the
	   edge bleed, and that block applies at this width too. What it gets wrong
	   for a phone is the card width (74vw/280px min-width, which forces a
	   near-full-screen card) and hiding the arrows. */
	.mgk-fbt { padding: 0 var(--mgk-pad-x) 16px; box-sizing: border-box; }
	.mgk-fbt__heading { font-size: 16px; font-weight: 700; color: var(--fm-ink); }
	.mgk-fbt__grid { gap: 12px; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
	/* min-width must be reset, not just flex-basis: the 720px rule sets both,
	   and a 280px min-width would override a smaller basis and win. */
	.mgk-fbt__grid .mgk-prod {
		flex: 0 0 min(78vw, 260px); min-width: 0;
		scroll-snap-align: start;
	}

	/* Heading row: title left, the two round arrows right — matching the PDP. */
	.mgk-fbt .mgk-sh {
		display: flex; flex-direction: row; align-items: center;
		justify-content: space-between; gap: 12px; margin-bottom: 10px;
	}
	.mgk-fbt .mgk-freshpicks__arrows { display: flex; flex: 0 0 auto; }
	.mgk-fbt .mgk-freshpicks__arrow {
		width: 32px; height: 32px; background: #F2F4F7;
	}
	.mgk-fbt .mgk-freshpicks__arrow:active { transform: scale(.94); }

	/* Empty cart. */
	.mgk-cart__empty { padding: 40px 24px; text-align: center; }
	.mgk-cart__empty-title { font-size: 18px; font-weight: 700; color: var(--fm-ink); }
	.mgk-cart__empty-text { font-size: 14px; color: var(--fm-ink-3); line-height: 1.5; }

	/* ── 107 No footer on mobile ─────────────────────────────────────────
	   The app design has no footer at all — the bottom tab bar is the standing
	   navigation, and a link column below it would be dead weight on a phone.

	   Only the footer's CONTENT (.mgk-footer__row) is hidden, never <footer>
	   itself: the PDPA & Cookie Preferences modal (shared/pdpa-modal.php) is
	   rendered inside it, once per page, and is the single site-wide target for
	   every "Manage Preferences" trigger. display:none on .mgk-footer would take
	   the modal with it and break all of those triggers at once. Phone shoppers
	   reach their cookie settings through Privacy & Notifications, Support, or
	   Trust & Compliance (linked from Account) — each carries its own trigger.
	   The cookie banner is emitted separately (inc/mgk-setup.php) and is
	   unaffected either way.

	   The element's own box is flattened as well: 32px padding + 32px margin +
	   a top border would otherwise leave a ~96px white band above the tab bar. */
	.mgk-footer__row { display: none; }
	.mgk-footer {
		padding: 0; margin: 0; border-top: 0; background: none;
	}

	/* ── 108 Fresh Deal (S-004 campaign page) ────────────────────────────
	   This page had no mobile skin at all — every block below rendered at its
	   desktop values on a 390px screen.

	   Reference is the mockup's "Flash Deals" screen: a red title band, then the
	   chip row, then a 2-up card grid. This page is NOT that screen (it is the
	   CNY campaign: hero + curated hampers + a product grid), so the mockup's
	   values are applied per-block to what this page actually has rather than
	   pretending the two are the same layout. The Sale page (.mgk-sale, § 104)
	   is the one that mirrors that screen 1:1.
	   ------------------------------------------------------------------ */

	/* Certification badge strip — hidden, per the standing "follow the mockup
	   exactly" rule: no phone screen in the design draws it, and at this width
	   6 badges wrap into 4 rows (165px, a third of the fold) before the shopper
	   sees a single product. These are marketing badges, not the statutory GST
	   line that is the agreed exception. Desktop keeps it (48px, one row).
	   The same widget is on Product Detail, whose Elementor data no longer
	   includes it, so this rule only ever affects this page today. */
	.mgk-trust { display: none; }

	/* Campaign hero: 30px/900 heading and 32px padding are desktop values. */
	.mgk-camphero { min-height: 0; }
	.mgk-camphero__inner { padding: 20px var(--mgk-pad-x); }
	.mgk-camphero__heading { font-size: 24px; font-weight: 800; line-height: 1.2; margin: 0 0 6px; }
	.mgk-camphero__sub { font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
	.mgk-camphero__badge { margin-bottom: 10px; }
	/* Both CTAs on one line, sharing the width — they wrap to two rows at this
	   size otherwise, and the design keeps a campaign's actions side by side. */
	.mgk-camphero__actions { gap: 8px; flex-wrap: nowrap; }
	.mgk-camphero__actions > * {
		flex: 1 1 0; min-width: 0; min-height: 44px;
		display: inline-flex; align-items: center; justify-content: center;
		padding: 0 12px; font-size: 14px; white-space: nowrap;
	}

	/* Hamper cards — the mockup's deal-card proportions: 108px photo, tighter
	   body, and a FULL-WIDTH button under the price instead of beside it.
	   Desktop puts price and button on one row (.mgk-hamper__foot), which at
	   171px wide squeezed "Add to Cart" into a 70px box that wrapped onto two
	   lines and sat flush against the price with no gap. */
	/* .mgk-section.mgk-hampers so this beats the (0,2,0) desktop full-bleed rule,
	   which would otherwise replace the phone's 16px gutter with 24px. */
	.mgk-section.mgk-hampers { padding: 16px var(--mgk-pad-x); box-sizing: border-box; }
	.mgk-hampers .mgk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	/* No need to undo the first-hamper 480x300 photo pin here — that rule is
	   gated behind @media (min-width: 1141px), so it never applies at this size.
	   Mobile keeps the ordinary 108px media well set just below. */
	.mgk-hamper { border-radius: 14px; }
	.mgk-hamper__media { height: 108px; }
	/* These hampers carry no image (mgk_get_hampers returns none), so every card
	   falls back to the 🧧 placeholder span. Its base rule centres it as a flex
	   box but gives it no height, so it collapsed to its 53px line box and sat
	   against the top of the 108px well. Full height centres it properly; the
	   emoji is scaled down to suit the shorter phone well. Not scoped to a page
	   — it is a fallback fix that is correct wherever the placeholder appears. */
	.mgk-hamper__img--ph { height: 100%; font-size: 34px; }
	.mgk-hamper__body { padding: 10px; }
	.mgk-hamper__name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
	.mgk-hamper__items { font-size: 11px; margin: 2px 0 8px; }
	.mgk-hamper__foot { display: block; }
	.mgk-hamper__price {
		display: block; font-size: 16px; font-weight: 800;
		color: var(--fm-blue); margin-bottom: 8px;
	}
	.mgk-hamper__foot .mgk-btn {
		display: flex; width: 100%; height: 38px; padding: 0;
		align-items: center; justify-content: center;
		border-radius: 20px; font-size: 12.5px; font-weight: 800;
		background: var(--fm-blue); color: #FFFFFF; border: 0;
		white-space: nowrap;
	}
	.mgk-hamper__foot .mgk-btn:active { transform: scale(.98); }

	/* ── 109 "All categories" bottom sheet ───────────────────────────────
	   Mockup (Categories screen): the chip strip's burger opens a sheet pinned to
	   the bottom of the screen — 22px top corners, max 80% height, its own
	   scrolling list of 54px rows (36px icon tile, name, product count, ✓ on the
	   current shelf), behind a dimmed backdrop.

	   The panel is styled inert-but-present rather than display:none so the
	   slide-up has a state to animate FROM; visibility keeps it out of the tab
	   order while closed, which display:none would also do but without the
	   transition. pointer-events guards against taps landing on the invisible
	   backdrop.
	   ------------------------------------------------------------------ */
	/* z-index must clear the fixed site header, which is z-index 500 — at a lower
	   value the header stayed ABOVE the backdrop and swallowed taps meant to
	   dismiss the sheet (the search field intercepted them). 600 clears it while
	   staying well under the cookie banner / PDPA modal at 100000, which are
	   consent layers and must never be covered. */
	.mgk-catmenu {
		position: fixed; inset: 0; z-index: 600;
		visibility: hidden; pointer-events: none;
	}
	.mgk-catmenu.is-open { visibility: visible; pointer-events: auto; }
	.mgk-catmenu__backdrop {
		position: absolute; inset: 0; background: rgba(16,24,40,.45);
		opacity: 0; transition: opacity .24s ease;
	}
	.mgk-catmenu.is-open .mgk-catmenu__backdrop { opacity: 1; }
	.mgk-catmenu__sheet {
		position: absolute; left: 0; right: 0; bottom: 0;
		max-height: 80%; display: flex; flex-direction: column;
		background: #FFFFFF; border-radius: 22px 22px 0 0;
		box-shadow: 0 -8px 28px rgba(16,24,40,.18);
		transform: translateY(100%); transition: transform .28s ease;
	}
	.mgk-catmenu.is-open .mgk-catmenu__sheet { transform: translateY(0); }
	.mgk-catmenu__head {
		display: flex; align-items: center; justify-content: space-between;
		padding: 18px 18px 8px; flex: 0 0 auto;
	}
	.mgk-catmenu__title {
		margin: 0; font-size: 18px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-catmenu__close {
		width: 40px; height: 40px; flex: 0 0 auto;
		border: 0; background: none; border-radius: 12px;
		font-size: 24px; line-height: 1; color: var(--fm-muted); cursor: pointer;
	}
	.mgk-catmenu__close:active { background: #F2F4F7; }
	/* The list scrolls, not the sheet, so the heading stays put on a long list. */
	.mgk-catmenu__list {
		flex: 1 1 auto; min-height: 0; overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		display: flex; flex-direction: column; gap: 4px;
		padding: 4px 12px 30px;
	}
	.mgk-catmenu__row {
		display: flex; align-items: center; gap: 12px;
		min-height: 54px; padding: 8px 12px; box-sizing: border-box;
		border: 1.5px solid transparent; border-radius: 14px;
		background: #FFFFFF; text-align: left; text-decoration: none;
	}
	.mgk-catmenu__row.is-active { border-color: var(--fm-blue); background: var(--fm-blue-bg); }
	.mgk-catmenu__row:active { background: #F2F4F7; }
	.mgk-catmenu__icon {
		width: 36px; height: 36px; flex: 0 0 auto;
		display: flex; align-items: center; justify-content: center;
		border-radius: 11px; background: #F2F4F7; font-size: 18px;
	}
	.mgk-catmenu__text { flex: 1 1 auto; min-width: 0; }
	.mgk-catmenu__name {
		display: block; font-size: 14px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-catmenu__count {
		display: block; margin-top: 1px;
		font-size: 11.5px; font-weight: 600; color: var(--fm-muted);
	}
	.mgk-catmenu__tick { flex: 0 0 auto; font-size: 16px; font-weight: 700; color: var(--fm-blue); }

	/* ── 110 Checkout (/fm-checkout/) ────────────────────────────────────
	   Mockup: the "Checkout" screen — a "Secure checkout" kicker, a 22px stage
	   title with the cart count + running total on the right, a 3-segment
	   progress bar, then a stack of 16px-radius white cards (`.checkout-card`,
	   1px #EAECF0 + a whisper of shadow) each led by a numbered chip; and,
	   pinned to the bottom of the viewport, a translucent bar holding one 52px
	   blue pill.

	   This page had NO mobile skin at all — it rendered desktop values on a
	   390px screen: a 32px-padded header, the 2fr/1fr grid (which only collapses
	   at 860px, so it WAS single-column here, but with 24px gaps and desktop
	   card padding), a 3-across delivery-method grid squeezed to ~110px per
	   tile, and the "Pay S$X" button parked at the very bottom of a long scroll
	   where the shopper only reaches it after the summary.

	   THE ONE STRUCTURAL DIFFERENCE from the mockup, stated plainly: the
	   prototype is a 3-STAGE WIZARD (details → time → pay, driven by its
	   `coStage` state — see `stDetails`/`stTime`/`stPay` in the source), whereas
	   this page is a single scrolling form that reveals the Payment card in
	   place after the order is placed (see the file header of
	   template-parts/sections/pages/checkout.php — that merge of S-008/S-009 is
	   a deliberate, working server-side contract, and mgk-storefront.js's
	   place-order → revealPaymentState() flow depends on it). Turning this into
	   a wizard would be a rewrite of that flow, not a restyle, and would break
	   the deep-link payment state (?order=&key=). So the mockup's per-stage
	   CHROME is applied to the equivalent scrolling sections instead: the same
	   cards, chips, tiles, chips-as-slots, payment rows and — most importantly —
	   the same sticky bottom pay bar, which is the mockup's actual usability win
	   here. The progress bar is not invented client-side; it simply isn't drawn,
	   because with no stages there is nothing truthful for it to show.

	   Everything else below is transcribed from the mockup's inline styles.
	   ------------------------------------------------------------------ */

	/* ── Wizard (3 steps, per the mockup) ────────────────────────────────
	   The mockup's Checkout screen is a 3-stage flow, and this is its chrome:
	   the "Secure checkout" kicker, the stage title + "Step N of 3", the cart
	   count and running total on the right, and the 3-segment progress bar.

	   The steps themselves are the page's OWN cards, shown one group at a time
	   by initCheckoutWizard() (mgk-storefront.js) — nothing is moved or
	   duplicated, so the underlying single-form contract is intact. See that
	   function's header for why hiding (not detaching) is what makes this safe.
	   ------------------------------------------------------------------ */
	.mgk-cowiz { padding: 16px var(--mgk-pad-x) 4px; }
	.mgk-cowiz[hidden] { display: none; }
	.mgk-cowiz__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
	.mgk-cowiz__headings { min-width: 0; }
	.mgk-cowiz__kicker {
		display: flex; align-items: center; gap: 6px; margin: 0;
		font-size: 11px; font-weight: 700; letter-spacing: .06em;
		text-transform: uppercase; color: var(--fm-blue);
	}
	.mgk-cowiz__kicker svg { flex: 0 0 auto; }
	.mgk-cowiz__title {
		margin: 6px 0 0; font-size: 22px; font-weight: 700;
		letter-spacing: -.4px; color: var(--fm-ink);
	}
	.mgk-cowiz__step { margin: 4px 0 0; font-size: 12.5px; color: var(--fm-muted); }
	.mgk-cowiz__totals { flex: 0 0 auto; text-align: right; }
	.mgk-cowiz__count { margin: 0; font-size: 11px; font-weight: 700; color: var(--fm-muted); }
	.mgk-cowiz__total { margin: 3px 0 0; font-size: 19px; font-weight: 700; color: var(--fm-ink); }
	.mgk-cowiz__bars { display: flex; gap: 6px; margin-top: 15px; }
	.mgk-cowiz__bar {
		flex: 1 1 0; height: 5px; border-radius: 3px; background: #E4E7EC;
		transition: background .2s ease;
	}
	.mgk-cowiz__bar.is-on { background: var(--fm-blue); }

	/* The class the wizard puts on every card group that is not the current
	   step. !important because several of these groups (.mgk-gst, the summary
	   head, the paystate card) carry their own display rules that would
	   otherwise win. */
	.mgk-cowiz-off { display: none !important; }

	/* The summary CARD is a special case: it contains the fixed-position pay
	   bar, which must survive on every step, and `display:none` on an ancestor
	   hides fixed descendants too. So instead of removing the shell, strip it
	   back to nothing — no box, no space — leaving the pay bar untouched. */
	/* !important throughout: the §110 card rule above lists
	   `.mgk-checkout__aside > .mgk-card:first-child` among its selectors, which
	   outranks this one on specificity, so without it the shell keeps its
	   border, padding and shadow and still draws an empty box. */
	.mgk-checkout__aside > .mgk-card.mgk-cowiz-off {
		display: block !important;
		padding: 0 !important; margin: 0 !important;
		border: 0 !important; background: none !important; box-shadow: none !important;
	}

	/* On steps 1–2 the pill is a "Continue", not the Pay button, so the
	   place-order gate must not disable it: that gate covers EVERY required
	   field on the page (including step 2's), so on step 1 it would be off from
	   the start and the shopper could never advance — and `pointer-events:none`
	   would stop the wizard's own click handler from running at all, so not
	   even the "which field is missing" feedback would fire. The wizard applies
	   its own per-step check instead (stepFieldsOk), and the real gate still
	   governs step 3, where the button actually places the order. */
	.mgk-checkout__paybar[data-mgk-cowiz-continue] .mgk-checkout__pay.is-disabled {
		opacity: 1; cursor: pointer; pointer-events: auto;
	}

	/* Why the Pay button is disabled on the final step (its cause lives back on
	   step 1), with the way back. Inserted by the wizard, above the pill. */
	.mgk-cowiz__gatenote {
		margin: 0 0 8px; text-align: center;
		font-size: 12.5px; font-weight: 600; color: #B42318;
	}
	.mgk-cowiz__gatenote[hidden] { display: none; }
	.mgk-cowiz__gatenote button {
		border: 0; background: none; padding: 0; cursor: pointer;
		font: inherit; color: var(--fm-blue); text-decoration: underline;
	}

	/* No back control in the pay bar — the mockup keeps stepping-back on the
	   header (see the note in checkout.php). */

	/* The app canvas: one continuous white surface, no page grey between cards.
	   Bottom padding clears the sticky pay bar (52px pill + 12/24px padding +
	   the hint line ≈ 128px) so the last card is never trapped under it.
	   body.mgk-is-checkout already gets no tab-bar padding (line ~2389) because
	   this page hides the site chrome — the pay bar takes that space instead. */
	body.mgk-is-checkout { background: #FFFFFF; }
	.mgk-checkout { padding: 0 0 132px; background: #FFFFFF; }

	/* ── No bottom tab bar on checkout ───────────────────────────────────
	   The mockup's tab bar is drawn only on its five ROOT screens
	   (home/categories/deals/orders/account — see `const ROOTS` in the
	   prototype); checkout is not one of them, and its own sticky pay bar
	   occupies that same strip instead.

	   The theme renders the tab bar on EVERY page (footer.php), so on checkout
	   it sat on top of the pay button — same z-index 400, declared later, so it
	   won — leaving the shopper looking at Home/Categories/Deals where the Pay
	   button should be. Hiding it here is both what the mockup shows and what
	   makes the pay bar reachable. */
	body.mgk-is-checkout .mgk-tabbar { display: none; }

	/* ── Header ──────────────────────────────────────────────────────────
	   The mockup's checkout header is a single 56px row: a round back button on
	   the left, the screen name centred, nothing on the right. This theme's
	   markup is "‹ Back to cart" / brand / "🔒 Secure checkout" — three items
	   that, at the desktop's 20px/32px padding and 18px brand, wrapped and ate
	   ~80px of a 390px screen.

	   So: the row is compacted to the mockup's height, the back link becomes the
	   left affordance, the brand becomes the centred title, and the "Secure
	   checkout" chip is dropped — the page kicker directly below already says
	   "SECURE CHECKOUT", so keeping both prints it twice in 100px.

	   position/z-index: it must sit ABOVE the cards as they scroll under it
	   (the mockup's header is pinned), and below the pay bar's 400. */
	/* The title is centred on the HEADER, not on the space left over beside the
	   back control — so the back control is taken out of flow (absolute) and the
	   title gets the full width. A 3-column grid can't do this: the control's
	   width changes with its label, which would shift the title sideways as the
	   wizard relabels it.
	   NOTE the mockup's back is an ICON only (a round 36px chevron button), which
	   is also what keeps the title truly centred on a 390px row — a text label
	   would overlap it. So the link's text is replaced by a ‹ glyph here: the
	   text is pushed out of the box and the glyph drawn as ::before, which keeps
	   the real label in the DOM for screen readers and leaves the desktop link
	   (and its "Back to cart"/"Back" text) completely untouched. */
	.mgk-checkout__header {
		position: sticky; top: 0; z-index: 300;
		display: flex; align-items: center; justify-content: center;
		min-height: 56px; padding: 0 52px; box-sizing: border-box;
		background: #FFFFFF; box-shadow: none;
		border-bottom: 1px solid var(--fm-line);
	}
	.mgk-checkout__header-back {
		position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
		width: 36px; height: 36px; padding: 0; overflow: hidden;
		display: inline-flex; align-items: center; justify-content: center;
		border-radius: 12px; background: #F2F4F7;
		text-decoration: none; text-indent: -999px; white-space: nowrap;
	}
	.mgk-checkout__header-back::before {
		content: '‹'; position: absolute; inset: 0; text-indent: 0;
		display: flex; align-items: center; justify-content: center;
		font-size: 22px; font-weight: 700; line-height: 1; color: var(--fm-ink-2);
	}
	.mgk-checkout__header-back:active { background: #E4E7EC; }
	.mgk-checkout__header-brand {
		font-size: 16px; font-weight: 700; color: var(--fm-ink); white-space: nowrap;
	}
	/* Duplicate of the page kicker below — see the note above. */
	.mgk-checkout__header-secure { display: none; }
	/* The text breadcrumb has no mobile design of its own yet — the wizard's
	   own "Step N of 3" + progress bars (below) already cover that role on a
	   390px screen, so don't duplicate it. */
	.mgk-stepper { display: none; }
	/* body.mgk-is-checkout already sets padding-top:0 (line ~5067) because this
	   page hides the site header; the sticky header above needs no offset. */

	/* Single column, no 24px desktop gutter between the form and the summary —
	   the summary is just the last card in the stack on a phone. */
	.mgk-checkout__grid { display: block; margin-top: 0; }
	.mgk-checkout__main, .mgk-checkout__aside { display: block; }

	/* ── Cards ───────────────────────────────────────────────────────────
	   The mockup's `.checkout-card`: 16px radius, 16px padding, #EAECF0 hairline
	   and a 2px/8px shadow at 3.5% — softer than the desktop card. 12px apart,
	   16px in from each edge. Applied to every .mgk-card inside the page so the
	   delivery, slot, payment, breakdown and summary cards all match. */
	.mgk-checkout .mgk-card,
	.mgk-checkout__aside > .mgk-card,
	.mgk-checkout__aside > .mgk-card:first-child {
		margin: 12px var(--mgk-pad-x); padding: 16px;
		background: #FFFFFF; border: 1px solid #EAECF0; border-radius: 16px;
		box-shadow: 0 2px 8px rgba(16, 24, 40, .035);
		box-sizing: border-box;
	}
	/* The aside's sticky-summary rule (line ~1753) is a desktop affordance: on a
	   phone the summary is in normal flow and sticking it would pin it over the
	   cards below as they scroll past. */
	.mgk-checkout__aside .mgk-card { position: static; top: auto; }
	/* .mgk-checkout__deliverystate is a flex column with its own 16px gap (line
	   ~1921), which STACKED on top of the 12px card margins above — 28px between
	   the first cards but 12px everywhere else, which read as a break in the
	   form. Card spacing comes from the margins alone so every gap matches. */
	.mgk-checkout__deliverystate { display: block; }

	/* Card heading: 15px/750 title led by a 28px rounded-square step chip.
	   The chip is #EFF4FF/blue for step 1 and grey for the rest in the mockup;
	   that alternation tracks its wizard stages, so here every chip takes the
	   blue treatment — on one continuous form they are peers, not a
	   current-vs-pending pair, and greying them all out would read as disabled. */
	.mgk-checkout .mgk-card__title {
		gap: 10px; margin: 0 0 4px;
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-checkout .mgk-card__step {
		width: 28px; height: 28px; border-radius: 9px;
		background: var(--fm-blue-bg); color: var(--fm-blue);
		font-size: 12px; font-weight: 800;
	}
	.mgk-checkout .mgk-card__sub {
		margin: 2px 0 12px; font-size: 12px; color: var(--fm-muted); line-height: 1.4;
	}

	/* Returning-customer banner — the mockup's full-bleed #EFF4FF strip. */
	.mgk-checkout__signin {
		margin: 0; padding: 10px var(--mgk-pad-x); border-radius: 0;
		background: var(--fm-blue-bg);
		font-family: inherit; font-size: 13.5px; font-weight: 600;
		color: var(--fm-ink-2);
	}
	.mgk-checkout__signin a { font-size: 13.5px; font-weight: 700; color: var(--fm-blue); }

	/* ── Delivery method: 2-up tiles ─────────────────────────────────────
	   Mockup: two 112px tiles side by side, 14px radius, icon tile → label →
	   meta. Desktop is a 3-across grid; Express is already filtered out of this
	   page (see the template), so two tiles fill the row exactly. repeat(2,...)
	   rather than a fixed 2-column list keeps a third method (were one ever
	   re-enabled) wrapping onto its own row instead of overflowing. */
	.mgk-checkout__methods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
	.mgk-checkout__methods .mgk-optcard {
		display: flex; flex-direction: column; align-items: flex-start;
		min-height: 112px; padding: 12px; gap: 0;
		border: 1.5px solid #E4E7EC; border-radius: 14px;
		background: #FFFFFF; text-align: left;
	}
	.mgk-checkout__methods .mgk-optcard.is-sel {
		border-color: var(--fm-blue); background: var(--fm-blue-bg);
	}
	.mgk-checkout__methods .mgk-optcard:active { transform: scale(.985); }
	.mgk-checkout__methods .mgk-optcard__icon {
		width: 34px; height: 34px; margin: 0;
		display: flex; align-items: center; justify-content: center;
		border-radius: 10px; background: #FFFFFF; font-size: 18px;
		box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
	}
	.mgk-checkout__methods .mgk-optcard__label {
		margin-top: 9px; font-size: 13.5px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-checkout__methods .mgk-optcard__desc {
		margin-top: 3px; font-size: 11.5px; line-height: 1.35; color: var(--fm-muted);
	}

	/* ── Address summary / picker ────────────────────────────────────────
	   Mockup: name + address as plain text with a blue "Change" link opposite,
	   on the card itself — not the grey inset panel desktop draws. */
	.mgk-checkout__addrhead { gap: 10px; }
	.mgk-checkout__addrsummary {
		margin: 12px 0 0; padding: 0; background: none; border-radius: 0;
		align-items: flex-start;
	}
	.mgk-checkout__addrsummary-who { font-size: 14px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout__addrsummary-detail { font-size: 13px; line-height: 1.5; color: var(--fm-ink-3); }
	.mgk-checkout__addrsummary-change {
		display: inline-flex; align-items: center; min-height: 36px;
		font-size: 13.5px; font-weight: 700; color: var(--fm-blue);
		text-decoration: none;
	}
	.mgk-checkout__addrpicker2 { margin: 12px 0 0; }
	.mgk-checkout__addrpicker2-head { display: block; margin-bottom: 10px; }
	.mgk-checkout__addrpicker2-title { font-family: inherit; font-size: 15px; font-weight: 700; }
	.mgk-checkout__addrpicker2-sub { font-size: 12.5px; color: var(--fm-muted); }
	/* "+ Add new address" — the mockup's full-width dashed blue button, above
	   the list. order:-1 lifts it there without moving it in the markup (the
	   list is a sibling that follows it in .mgk-checkout__addrpicker2-head). */
	.mgk-checkout__addrpicker2-addnew {
		display: flex; width: 100%; min-height: 40px; margin-top: 10px;
		align-items: center; justify-content: center;
		border: 1.5px dashed var(--fm-blue); border-radius: 12px;
		background: #FFFFFF; color: var(--fm-blue);
		font-size: 14px; font-weight: 700;
	}
	.mgk-checkout__addrpicker2-addnew:active { background: #F5F8FF; }
	.mgk-checkout__addrpicker2-item {
		gap: 10px; padding: 12px; border-radius: 12px; border-width: 1.5px;
	}
	.mgk-checkout__addrpicker2-block { font-size: 13.5px; line-height: 1.4; }
	.mgk-checkout__addrpicker2-who { font-size: 12.5px; color: var(--fm-muted); }
	/* Edit/Delete sit under the address on a 390px row rather than beside it —
	   as a column they squeeze the address text to ~40% of the row. */
	.mgk-checkout__addrpicker2-actions { flex-direction: row; gap: 14px; align-items: center; }

	/* ── Form fields ─────────────────────────────────────────────────────
	   Mockup: 13.5px/700 label, 48px control, 12px radius, 1.5px #D0D5DD.
	   16px input text is deliberate and must not be lowered — iOS Safari
	   auto-zooms the viewport on focus for anything under 16px, which on this
	   page would zoom the shopper into a form they then have to pinch back out
	   of on every field. */
	/* One column at this width, so the grid's own gap is what separates its
	   fields (their margins are zeroed just below) and it carries the same 14px
	   below itself that a standalone field does. */
	.mgk-checkout .mgk-form__grid2 {
		grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px;
	}
	/* The base .mgk-field is display:block (line ~1069), so a `gap` would do
	   nothing — the 6px the mockup puts between a label and its control has to
	   come from the label's own margin. 14px below each field is the mockup's
	   spacing between stacked inputs. */
	.mgk-checkout .mgk-field { display: block; margin-bottom: 14px; }
	/* Only a field that is the last thing in its CARD loses the trailing margin.
	   The earlier `:last-child` form also caught the last field of each
	   .mgk-form__grid2 — which, now that the grid is one column, is a field with
	   another field right under it, so it closed up against the next label. */
	.mgk-checkout .mgk-card > .mgk-field:last-child,
	.mgk-checkout .mgk-checkout__addrform > .mgk-field:last-child { margin-bottom: 0; }
	.mgk-checkout .mgk-form__grid2 > .mgk-field { margin-bottom: 0; }
	/* :not(.mgk-field__phone-row) for the reason spelled out at line ~933: the
	   +65 row is ALSO a direct <span> child of .mgk-field, and a display:block
	   here outranks the base `span.mgk-field__phone-row { display: flex }` (2
	   classes + element beats 1 element + 1 class), which collapses the prefix
	   onto its own line above the input. Only the LABEL span is restyled. */
	.mgk-checkout .mgk-field > span:not(.mgk-field__phone-row) {
		display: block; margin-bottom: 6px;
		font-size: 13.5px; font-weight: 700; color: var(--fm-ink-2);
	}
	.mgk-checkout .mgk-field__note { font-weight: 500; color: var(--fm-muted); }
	.mgk-checkout .mgk-field input[type="text"],
	.mgk-checkout .mgk-field input[type="email"],
	.mgk-checkout .mgk-field input[type="tel"],
	.mgk-checkout .mgk-combo__control input {
		height: 48px; padding: 0 14px; box-sizing: border-box;
		border: 1.5px solid #D0D5DD; border-radius: 12px;
		font-size: 16px; color: var(--fm-ink);
	}
	.mgk-checkout .mgk-field input:focus,
	.mgk-checkout .mgk-combo__control input:focus {
		border-color: var(--fm-blue); box-shadow: 0 0 0 3px rgba(14, 66, 210, .18);
		outline: none;
	}
	/* Phone: the base draws the border on the ROW and leaves the inner input
	   transparent, so the 48px/12px-radius treatment goes on the row — putting
	   it on the input would draw a second, nested box. The +65 prefix stays the
	   plain inline label the base makes it. */
	.mgk-checkout span.mgk-field__phone-row {
		height: 48px; padding: 0 14px; box-sizing: border-box; gap: 6px;
		border: 1.5px solid #D0D5DD; border-radius: 12px; background: #FFFFFF;
	}
	.mgk-checkout span.mgk-field__phone-row:focus-within {
		border-color: var(--fm-blue); box-shadow: 0 0 0 3px rgba(14, 66, 210, .18);
	}
	.mgk-checkout .mgk-field__phone-prefix { font-size: 15px; color: var(--fm-muted); }
	/* The generic 48px input rule above would give this inner input its own
	   border and height inside the row — reset it back to the bare field the
	   base intends.

	   The extra specificity unit is load-bearing, not decoration: the generic
	   rule is `.mgk-checkout .mgk-field input[type="text"]`, whose attribute
	   selector makes it (0,3,1) — strictly stronger than the (0,2,1) this reset
	   originally had, so the reset silently lost and the input kept its own
	   1.5px border, 12px radius and 48px height INSIDE the bordered row: two
	   nested boxes. Repeating [type="text"] here takes the reset to (0,3,2),
	   which wins on specificity rather than on source order. Covers both phone
	   fields (Delivery Address and the address modal's Recipient Phone) — the
	   only two `.mgk-field__phone-row` sites, both `type="text"`. */
	.mgk-checkout span.mgk-field__phone-row input[type="text"] {
		flex: 1 1 auto; min-width: 0; height: 100%; padding: 0;
		border: 0; background: transparent; font-size: 16px;
	}
	.mgk-checkout span.mgk-field__phone-row input[type="text"]:focus { box-shadow: none; }
	/* Required-field validation (mgk-storefront.js stepFieldsOk/checkoutGateOk)
	   toggles .is-invalid on the raw <input> — same class the profile page
	   already styles red, but this checkout block's own 48px input rule above
	   otherwise wins with its plain #D0D5DD border, so it needs its own
	   override here. Phone is a special case: its border lives on the
	   `span.mgk-field__phone-row` wrapper, not the (border:0) input inside it,
	   so the red state has to key off `:has(input.is-invalid)` on that row. */
	.mgk-checkout .mgk-field input.is-invalid {
		border-color: var(--mgk-red); background: #FEF3F2;
	}
	.mgk-checkout .mgk-field input.is-invalid:focus {
		box-shadow: 0 0 0 3px rgba(232, 80, 64, .12);
	}
	.mgk-checkout span.mgk-field__phone-row:has(input.is-invalid) {
		border-color: var(--mgk-red); background: #FEF3F2;
	}
	/* The zone hint sits between the postal field and the next label, so it
	   needs breathing room on BOTH sides or it reads as that label's caption. */
	.mgk-checkout__zone { font-size: 12.5px; margin: 0 0 14px; line-height: 1.45; }
	/* Billing / business toggles — 44px targets, as tappable rows. */
	.mgk-checkout__billing-toggle, .mgk-checkout__business-toggle {
		min-height: 44px; margin-top: 8px; font-size: 13.5px; color: var(--fm-ink-2);
	}
	.mgk-checkout__billing-toggle input, .mgk-checkout__business-toggle input {
		width: 20px; height: 20px; accent-color: var(--fm-blue);
	}

	/* ── Delivery slots: pill chips ──────────────────────────────────────
	   Mockup: 40px pills, 22px radius, wrapping — each already reads
	   "Tomorrow, 10:00–12:00", so they need the full row width they take. */
	.mgk-checkout__timeslots { gap: 8px; margin: 12px 0 0; }
	.mgk-checkout__timeslot {
		min-height: 40px; padding: 0 14px;
		border: 1.5px solid #E4E7EC; border-radius: 22px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 13.5px; font-weight: 700;
	}
	.mgk-checkout__timeslot.is-sel {
		background: var(--fm-blue-bg); border-color: var(--fm-blue); color: var(--fm-blue);
	}
	.mgk-checkout__note { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--fm-muted); }

	/* ── Payment method rows ─────────────────────────────────────────────
	   Mockup: separate 56px bordered rows with a radio, label and sub-label —
	   not the desktop's flush, hairline-separated list. The right-hand meta
	   ("VISA · Mastercard · AMEX") becomes the sub-label the mockup draws under
	   the name; the template's own .mgk-paymethod__desc carries the same
	   information and is hidden on desktop, so show that and drop the meta
	   rather than printing both. */
	.mgk-paymethods { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
	.mgk-checkout .mgk-paymethod {
		min-height: 56px; padding: 10px 12px; gap: 10px;
		border: 1.5px solid #E4E7EC; border-top: 1.5px solid #E4E7EC;
		border-radius: 12px; background: #FFFFFF;
	}
	.mgk-checkout .mgk-paymethod.is-sel { border-color: var(--fm-blue); background: #FFFFFF; }
	.mgk-checkout .mgk-paymethod__label { font-size: 14px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout .mgk-paymethod__desc {
		display: block; margin-top: 2px; font-size: 12px; color: var(--fm-muted);
	}
	.mgk-checkout .mgk-paymethod__meta { display: none; }
	/* Panels are children of .mgk-paymethods, so they'd inherit the 8px gap as
	   a sibling row; the negative margin tucks each panel under the row it
	   belongs to. Left padding drops to 12px — desktop's 46px indent (to clear
	   the radio) leaves the QR box ~200px wide here. */
	.mgk-checkout .mgk-paymethod__panel {
		margin-top: -4px; padding: 12px;
		border: 1px solid var(--fm-line); border-radius: 12px; background: #F7F8FA;
	}
	.mgk-checkout .mgk-paynow__box {
		width: 100%; padding: 16px; box-sizing: border-box;
		border: 0; background: none; border-radius: 12px;
	}
	.mgk-checkout .mgk-paynow__title { font-size: 14px; font-weight: 700; }
	.mgk-checkout .mgk-paynow__qr { width: 150px; height: 150px; }
	.mgk-checkout .mgk-paynow__amount { font-size: 22px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout .mgk-paynow__uen { font-size: 12px; color: var(--fm-muted); line-height: 1.45; }
	.mgk-checkout .mgk-savedcard__row { padding: 10px; border-radius: 10px; gap: 10px; }
	.mgk-checkout .mgk-savedcard__detail { font-size: 13.5px; }
	.mgk-checkout .mgk-savedcard__status { font-size: 11.5px; }
	/* Card form: same 48px/16px treatment as the delivery form above, for the
	   same iOS-zoom reason. */
	.mgk-checkout .mgk-card-form__row2 { display: flex; gap: 10px; }
	.mgk-checkout .mgk-card-form__row2 > .mgk-card-form__field { flex: 1 1 0; min-width: 0; }
	.mgk-checkout .mgk-card-form__field label { font-size: 13.5px; font-weight: 700; color: var(--fm-ink-2); }
	.mgk-checkout .mgk-card-form__input {
		height: 48px; padding: 0 14px; box-sizing: border-box;
		border: 1.5px solid #D0D5DD; border-radius: 12px; font-size: 16px;
	}
	/* Failed-payment / PayNow-locked actions stack full-width — three buttons
	   in a row are ~110px each here, which wraps their labels to two lines. */
	.mgk-pay__failed-actions, .mgk-paynow__locked-actions {
		display: flex; flex-direction: column; gap: 8px;
	}
	.mgk-pay__failed-actions .mgk-btn, .mgk-paynow__locked-actions .mgk-btn {
		width: 100%; min-height: 44px; border-radius: 22px;
	}

	/* ── Order summary ───────────────────────────────────────────────────
	   Mockup: "Order summary" 16px/700 with the item count in blue opposite,
	   the item lines, then a ruled totals block and a 16px/20px Total row. */
	.mgk-checkout__sumhead { margin-bottom: 12px; }
	.mgk-checkout .mgk-cart__summary-title {
		margin: 0; font-size: 16px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-checkout__sumcount { font-size: 13px; font-weight: 700; color: var(--fm-blue); }
	.mgk-checkout .mgk-sumitems { gap: 10px; margin-bottom: 12px; }
	.mgk-checkout .mgk-sumitems__name { font-size: 13.5px; line-height: 1.4; }
	.mgk-checkout .mgk-sumitems__line { font-size: 13.5px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout .mgk-gst {
		gap: 7px; margin: 0; padding-top: 12px; font-size: 14px;
		border-top: 1px solid var(--fm-line);
	}
	.mgk-checkout .mgk-gst__row { color: var(--fm-muted); }
	.mgk-checkout .mgk-gst__row > span:last-child { font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout .mgk-gst__row--free > span:last-child { color: #067647; }
	/* Tax/GST groups with Total below it, not with Subtotal/Delivery above —
	   same divider placement as the desktop rule. */
	.mgk-checkout .mgk-gst__row--tax {
		margin-top: 10px; padding-top: 12px;
		border-top: 1px solid var(--fm-line);
	}
	.mgk-checkout .mgk-gst__total { align-items: baseline; }
	.mgk-checkout .mgk-gst__total > span:first-child { font-size: 16px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout .mgk-gst__total > span:last-child { font-size: 20px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout .mgk-gst__note { margin-top: 8px; font-size: 11.5px; line-height: 1.45; }

	/* Promo code: input + Apply on one row, as drawn (82px button column). */
	.mgk-checkout__voucher { display: grid; grid-template-columns: minmax(0, 1fr) 82px; gap: 8px; margin: 0 0 12px; }
	.mgk-checkout__voucher-input {
		min-width: 0; height: 48px; padding: 0 13px; box-sizing: border-box;
		border: 1.5px solid #D0D5DD; border-radius: 12px; font-size: 16px;
	}
	.mgk-checkout__voucher .mgk-btn {
		height: 48px; padding: 0 12px; border-radius: 12px;
		border: 1.5px solid var(--fm-blue); background: #FFFFFF; color: var(--fm-blue);
		font-size: 14px; font-weight: 700;
	}
	/* Voucher wallet: one swipeable row of dashed cards. */
	.mgk-checkout__vouchers {
		display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
		margin-bottom: 12px; padding-bottom: 2px;
	}
	.mgk-checkout__voucher-card {
		flex: 0 0 auto; min-width: 150px; padding: 10px 12px;
		border: 1px dashed #98A2B3; border-radius: 12px; background: #F7F8FA;
		text-align: left;
	}
	.mgk-checkout__voucher-desc { font-size: 13.5px; font-weight: 700; color: var(--fm-ink); }
	.mgk-checkout__voucher-exp { font-size: 11.5px; color: var(--fm-muted); }

	/* ── Sticky pay bar ──────────────────────────────────────────────────
	   The mockup's most consequential element on this screen: the pay action is
	   pinned to the bottom of the viewport, not buried under the summary. One
	   52px pill at 26px radius on a translucent blurred bar, with the security
	   line beneath.

	   position:fixed (the prototype uses absolute inside its 390×844 phone
	   frame — in a real viewport that is what fixed does). The 24px bottom
	   padding is the mockup's home-indicator allowance; env(safe-area-inset)
	   is added on top so it clears the indicator on a notched device too.

	   z-index 400 keeps it under the site header's 500 (irrelevant here, the
	   header is hidden on checkout) and well under the PDPA/cookie consent
	   layers at 100000, which must never be covered. */
	.mgk-checkout__paybar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
		padding: 12px var(--mgk-pad-x) calc(24px + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
		border-top: 1px solid rgba(228, 231, 236, .95);
		background: rgba(255, 255, 255, .97);
		-webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
		box-shadow: 0 -10px 28px rgba(16, 24, 40, .08);
	}
	/* The pill itself. The selector carries .mgk-btn--lg's own specificity plus
	   one more class so it beats the base .mgk-btn/.mgk-btn--lg sizing. */
	.mgk-checkout__paybar .mgk-checkout__pay,
	.mgk-checkout__paybar a.mgk-checkout__pay {
		display: flex; align-items: center; justify-content: center; gap: 6px;
		width: 100%; height: 52px; min-height: 52px; padding: 0;
		box-sizing: border-box; border: 0; border-radius: 26px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 15.5px; font-weight: 700; text-decoration: none;
		box-shadow: 0 8px 18px rgba(14, 66, 210, .2);
	}
	.mgk-checkout__paybar .mgk-checkout__pay:active { transform: scale(.98); }
	/* Dim only via .is-disabled — the same class the base .mgk-btn rule uses and
	   that refreshCheckoutGate() drives. Keying off aria-disabled instead left
	   the pill faded on the wizard's Continue steps, where that attribute
	   legitimately reads "true" (the gate covers fields on steps the shopper
	   has not reached yet) while the button is deliberately still usable. */
	.mgk-checkout__paybar .mgk-checkout__pay.is-disabled { opacity: .6; }
	.mgk-checkout__paybar-secure {
		margin: 7px 0 0; text-align: center;
		font-size: 11.5px; color: var(--fm-muted);
		white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	}
	.mgk-checkout__paybar .mgk-pay__methodhint {
		margin: 7px 0 0; text-align: center; font-size: 11.5px; color: var(--fm-muted);
	}
	/* The terms/PDPA line is a full sentence plus a link — inside a bar that is
	   already carrying the pill and the security line it would push the bar to
	   ~180px, a fifth of the screen. The consent link it holds is reachable from
	   the footer's PDPA modal triggers (see § 107), so it is dropped here only,
	   at this width; desktop keeps it. */
	.mgk-checkout__paybar .mgk-pay__terms { display: none; }
	.mgk-checkout__err { margin: 0 var(--mgk-pad-x) 12px; border-radius: 12px; font-size: 13px; }

	/* ── 111 Order confirmed (/order-success/) ───────────────────────────
	   Mockup ("Order confirmed" screen): 24px/16px page padding, then ONE card —
	   18px radius, 1px #E4E7EC, 26px/20px padding, centred — holding a 64px
	   #ECFDF3 disc with a 40px #067647 check inside it, a 22px/700 heading, a
	   13.5px muted "Order … · a confirmation email is on its way to …" line, a
	   #F7F8FA 14px-radius recap block (Paid / Delivery / Address as label-left
	   value-right rows), a full-width 40px blue pill "Track my order", and a
	   plain-text "Continue shopping" beneath it.

	   The page's own markup already matches that structure 1:1 — the same card,
	   check, heading, message, recap rows and two actions — so this is purely a
	   restyle of what's there. What it was doing at 390px instead: the desktop
	   rule centres the card in `min-height: calc(100vh - 64px)`, which on a
	   phone pushed it ~430px down behind a screenful of blank space; the check
	   sat at 64px with no disc behind it; the CTA was a 12px-radius rectangle
	   rather than the mockup's pill; and the card carried 36px side padding on a
	   358px-wide screen.

	   ITEMS + GST: the mockup's confirmation card shows no line items and no tax
	   breakdown — just the recap. Both are KEPT here anyway. The GST/UEN block is
	   the statutory receipt disclosure (the standing exception to following the
	   mockup exactly — same call as the Cart's § 106), and the item list is the
	   only place a phone shopper sees WHAT they just bought; the prototype can
	   omit it because its next screen is a full order detail, which this flow
	   reaches only via "Track my order". They are restyled to the mockup's
	   language rather than dropped.
	   ------------------------------------------------------------------ */
	.mgk-success {
		display: block; min-height: 0;
		padding: 24px var(--mgk-pad-x);
		font-family: inherit;
		box-sizing: border-box;
	}
	/* The confirmed screen is not one of the mockup's five ROOT screens, so it
	   draws no bottom tab bar (same rule as checkout, § 110). The class comes
	   from inc/mgk-setup.php's body_class filter — the bar lives in footer.php,
	   a different DOM branch, so no sibling/descendant selector can reach it.
	   Nothing here is fixed to the bottom, so body's 74px tab-bar allowance goes
	   back to the page too. */
	body.mgk-is-confirmed .mgk-tabbar { display: none; }
	body.mgk-is-confirmed { padding-bottom: 0; }

	.mgk-success__card {
		max-width: none; padding: 26px 20px; gap: 0;
		border: 1px solid var(--fm-line); border-radius: 18px;
		box-shadow: none; text-align: center;
	}

	/* 64px #ECFDF3 disc with the check centred in it. The inline SVG already
	   draws its own pale ring + green fill, so the disc is left transparent and
	   only the sizing is set — adding a second background would double it. */
	.mgk-success__check {
		width: 64px; height: 64px; margin: 0 auto;
		display: flex; align-items: center; justify-content: center;
	}
	.mgk-success__check svg { width: 100%; height: 100%; display: block; }
	.mgk-success__invoice { top: 16px; right: 16px; }
	.mgk-success__invoice svg { width: 18px; height: 18px; }

	.mgk-success__heading {
		margin: 16px 0 0; font-size: 22px; font-weight: 700; line-height: 1.25;
		color: var(--fm-ink);
	}
	.mgk-success__msg {
		margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--fm-ink-3);
	}

	/* Items + receipt: the mockup's own card language (14px radius, #F7F8FA)
	   rather than the desktop's white inset with a 1px #EDF1F6 border. */
	.mgk-success__order {
		margin-top: 16px; padding: 14px;
		border: 0; border-radius: 14px; background: #F7F8FA;
		text-align: left;
	}
	.mgk-success__item { gap: 10px; padding: 10px 0; }
	.mgk-success__item:first-child { padding-top: 0; }
	.mgk-success__item + .mgk-success__item { border-top-color: #E4E7EC; }

	/* Long item list collapse (show 3, "View more" for the rest) is defined
	   once, at every viewport — see .mgk-success__sumcollapse and
	   .mgk-success__items--collapsed above (§ 2569 area). Nothing phone-only
	   left to declare here. */
	.mgk-success__item-img {
		flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px;
		background: #FFFFFF;
	}
	.mgk-success__item-name {
		font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--fm-ink);
	}
	.mgk-success__item-price { font-size: 13.5px; font-weight: 700; color: var(--fm-ink); }
	.mgk-success__gst {
		gap: 7px; margin: 0; padding-top: 12px;
		font-size: 13.5px; border-top: 1px solid #E4E7EC;
	}
	.mgk-success__gst .mgk-gst__row { color: var(--fm-muted); }
	.mgk-success__gst .mgk-gst__row > span:last-child { font-weight: 700; color: var(--fm-ink); }
	.mgk-success__gst .mgk-gst__total {
		margin-top: 4px; padding-top: 10px; align-items: baseline;
		border-top: 1px solid #E4E7EC;
	}
	.mgk-success__gst .mgk-gst__total > span:first-child { font-size: 14px; font-weight: 700; color: var(--fm-ink); }
	.mgk-success__gst .mgk-gst__total > span:last-child { font-size: 17px; font-weight: 700; color: var(--fm-ink); }
	.mgk-success__reg { margin-top: 16px; font-size: 11px; line-height: 1.45; color: var(--fm-muted); }

	/* Recap block — the mockup's #F7F8FA panel, 9px between rows, label muted
	   on the left and value bold right-aligned. */
	.mgk-success__recap {
		margin-top: 12px; padding: 14px; gap: 9px;
		border-radius: 14px; background: #F7F8FA;
	}
	.mgk-success__recap-row { gap: 12px; }
	.mgk-success__recap-label {
		flex: 0 0 auto; font-size: 13.5px; font-weight: 500; line-height: 1.45;
		color: var(--fm-muted);
	}
	.mgk-success__recap-val {
		font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--fm-ink);
	}

	/* Actions: a 40px/25px-radius blue pill, then "Continue shopping" as plain
	   bold text (the mockup gives the secondary action no underline and no box). */
	.mgk-success__track {
		width: 100%; height: 40px; margin-top: 18px; padding: 0;
		border-radius: 25px; background: var(--fm-blue);
		font-size: 15px; font-weight: 700;
	}
	.mgk-success__track:active { transform: scale(.98); }
	.mgk-success__home {
		display: flex; align-items: center; justify-content: center;
		width: 100%; min-height: 40px; margin-top: 8px;
		font-size: 14px; font-weight: 700; color: var(--fm-ink-2);
		text-decoration: none;
	}
	.mgk-success__home-wide { display: none; }
	.mgk-success__home-narrow { display: inline; }
	.mgk-success__help { margin-top: 10px; font-size: 11.5px; line-height: 1.45; }
}

/* The pay bar's security line is drawn by the phone skin only — above 640px the
   pay button sits in the summary card in normal flow and the terms/PDPA line
   right below it already carries this assurance. Outside the media query so it
   applies at every width the block above does not cover. */
@media (min-width: 641px) {
	.mgk-checkout__paybar-secure { display: none; }
}
/* Assurance line under the Pay pill — unlike .mgk-checkout__paybar-secure this
   one is shown at every width, so it lives outside both media queries above.
   Hidden on mobile wizard steps 1-2 (data-mgk-cowiz-continue, set by
   mgk-storefront.js's render()) — same as the pre-existing security line,
   this is payment-screen copy and would be premature before step 3. */
.mgk-checkout__paybar-assurance {
	margin: 7px 0 0; text-align: center;
	font-size: 11.5px; color: #8A9FB5;
}
.mgk-checkout__paybar[data-mgk-cowiz-continue] .mgk-checkout__paybar-assurance {
	display: none;
}

/* The sheet is phone-only: above 640px the full chip strip and its sort control
   are already on one row with room to spare, and the burger chip that opens this
   is itself hidden there. Outside the media query so it applies at EVERY width
   the block above does not cover. */
@media (min-width: 641px) {
	.mgk-catmenu { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
 * BATCH 3 — Account group, MOBILE APP SKIN
 * (My Account · Profile · Settings · Password · Addresses · Privacy ·
 *  Order History · Buy again · Wishlist · Reviews)
 *
 * Source: UI-html/FreshMart Mobile Standalone(1).html, one screen per
 * data-screen-label:
 *   "My Account" · "My Profile" · "Account settings" · "Change password" ·
 *   "Addresses" · "Privacy & Notifications" · "Order History" · "Buy again" ·
 *   "Wishlist" · "Customer Reviews"
 *
 * Same 640px breakpoint and same --fm-* palette as Batch 1 above (declared on
 * :root inside the S-001 media query, so it is in scope here and absent on
 * desktop). DESKTOP AND TABLET ARE UNTOUCHED: every rule below lives inside
 * max-width: 640px and is scoped to an account page's own block
 * (.mgk-profile / .mgk-privacy / .mgk-addr / .mgk-ohist / .mgk-wish /
 * .mgk-rev), never to a bare .mgk-card / .mgk-btn / .mgk-chip / .mgk-qty used
 * site-wide.
 *
 * The mockup's shared idiom for this whole group — and what these pages did NOT
 * have at 390px — is: a 16px page gutter, one white 16px-radius card per group
 * with a 1px #E4E7EC hairline and no shadow, 14–15px/700 row titles on #101828,
 * 12.5–13.5px #667085 secondary text, 48px form inputs at font-size 16px (below
 * 16px iOS Safari zooms the page on focus), and 40px-tall pill buttons
 * (border-radius 20–25px). Every rule below is one of those values applied to
 * the markup that is already on the page.
 *
 * Structural notes, since the real pages and the mockup are not 1:1:
 *
 *   · The mockup is ONE app with a stack of screens; the real site is separate
 *     WordPress pages that each repeat a left account-nav sidebar. That sidebar
 *     is already a burger-triggered fixed panel at ≤720px (see
 *     .mgk-profile__nav, § "Profile" above) and is left exactly as-is — it IS
 *     the mockup's "My Account" menu list, reached from the header rather than
 *     rendered inline. Only its type scale is nudged to the mockup's 14px rows.
 *
 *   · "My Account", "Account settings" and "Buy again" have no page of their
 *     own in this theme. Their mockup content maps onto pages that DO exist —
 *     the account-nav panel (menu list), Profile (identity card + Personal
 *     details), and Order History's Reorder action — so this block styles those
 *     rather than inventing three new templates, which would be a content
 *     change and not a responsive fix. Called out at each § below.
 *
 *   · Where the mockup and the real page disagree on CONTENT the real page
 *     wins if the content is load-bearing (a statutory line, a real field the
 *     backend posts); the mockup wins on every presentation choice. The two
 *     content keeps are marked "CONTENT KEEP" at the rule that keeps them.
 * ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

	/* ── 300 App bar — inner-screen mode (back arrow + screen title) ─────
	   The mockup's top bar has TWO modes, and this header only ever rendered
	   the first:

	     ROOTS (home · categories · deals · orders · account — the tab-bar
	       destinations) → wordmark + address row + notification bell, no Back.
	       Home alone also shows the search bar under the bar.
	     EVERY OTHER SCREEN (My Profile, Addresses, Change password, Privacy &
	       Notifications, Cart, Checkout, …) → a 40px back arrow, then the
	       SCREEN TITLE at 17px/700, and nothing else on the left. No wordmark,
	       no address row, no bell, NO SEARCH BAR.

	   (mockup line 4049: `canBack:!isRoot`, `barTitleOn:s.screen!=='home'`,
	    `barTitleSize:isRoot?'22px':'17px'`, `showTabs:isRoot`; titles at 4021.)

	   header.php now emits .mgk-header--root / --inner / --home plus the back
	   link and title, so this is a pure display switch. Nothing is removed from
	   the DOM and desktop keys off none of these classes. */

	/* Inner: one row — [back] [title] … [cart]. 52px total, per the mockup's
	   `min-height:52px; padding:6px 16px` app bar. */
	.mgk-header--inner {
		flex-wrap: nowrap; align-items: center;
		gap: 6px; padding: 6px 16px; min-height: 52px;
	}
	/* The root-mode rule gives the icon buttons min-height:52px so they align to
	   the two-line brand block (wordmark + address). In inner mode there is no
	   such block — the row is 40px controls — and that 52px made the bar 64px
	   (52 + 2×6 padding), which then had to be paid for in body padding-top and
	   read as a dead band under the bar. */
	.mgk-header--inner .mgk-header__cart,
	.mgk-header--inner .mgk-header__notifications {
		min-height: 40px; height: 40px;
	}
	/* The wordmark/address block and the bell are the root-mode identity; the
	   search bar belongs to Home alone. */
	.mgk-header--inner .mgk-header__left,
	.mgk-header--inner .mgk-header__notif-wrap,
	.mgk-header--inner .mgk-header__notifications,
	.mgk-header--inner .mgk-header__search { display: none; }
	/* The burger's account-menu exception (see the ≤640px block above) is also
	   root-mode only now: on an inner account screen the bar carries Back and
	   the title, and the hub at /account/ is the way between those pages. */
	.mgk-header--inner .mgk-header__burger,
	body:has(.mgk-profile__nav) .mgk-header--inner .mgk-header__burger { display: none; }

	.mgk-header__back {
		order: 0; flex: 0 0 auto;
		display: inline-flex; align-items: center; justify-content: center;
		width: 40px; height: 40px; margin-left: -12px;
		border: 0; border-radius: 12px;
		background: none; color: var(--fm-ink); text-decoration: none;
	}
	.mgk-header__back:active { background: #F2F4F7; }
	.mgk-header__back svg { display: block; width: 22px; height: 22px; }
	/* display is restated: the base rule (line ~95) hides both app-bar elements
	   at every width so desktop never renders them, so setting only the type
	   and flex here would leave the title invisible. */
	.mgk-header__title {
		display: block;
		order: 1; flex: 1 1 auto; min-width: 0;
		font-family: 'Quicksand', var(--mgk-font);
		font-size: 17px; font-weight: 700; color: var(--fm-ink);
		white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	}
	/* Root screens keep the wordmark, so the title is redundant there — the
	   mockup shows one or the other, never both. Home has no title at all. */
	.mgk-header--root .mgk-header__title { display: none; }

	/* Only Home gets the search bar (mockup: `atHome`). Categories, Deals,
	   Orders and Account are roots but still search-less. */
	.mgk-header--root:not(.mgk-header--home) .mgk-header__search { display: none; }

	/* The bar is FIXED, so body's padding-top reserves its height. The rule
	   above (line ~2426) reserves 134px for the two-row home bar:
	     6 (pad-top) + 52 (brand/icon row) + 2 + 42 (search pill) + 12 + 20 gap.
	   An inner bar is ONE 52px row — 6 + 52 + 6 = 64, +14 for the same
	   breathing gap — so without this every inner screen opened with ~56px of
	   dead space under the bar. :has() scopes it to pages whose header rendered
	   in inner mode; every browser this app bar targets supports it (the burger
	   rule above already relies on the same). */
	/* EXACTLY the bar's height (6 + 40 + 6 = 52) and no more. The mockup's inner
	   screens start their content immediately under the bar — the first card's
	   own 14px top padding (§ 301) is the only separation. An earlier revision
	   reserved 78px here, which left a visible 14px dead band under the bar on
	   top of that padding. */
	body:has(.mgk-header--inner) { padding-top: 52px; }
	/* NO admin-bar variant. WordPress's own admin-bar stylesheet sets
	   `html { margin-top: 46px }`, so the BODY already begins below the bar and
	   this padding is measured from there — the bar is paid for once, by that
	   margin. `body.admin-bar .mgk-header { top: 46px }` (line 172) separately
	   pushes the FIXED header clear of the bar, which is correct because a fixed
	   box is positioned against the viewport, not the body. Adding +46px here as
	   well double-counted it and opened exactly 46px of dead space under the bar
	   on every inner screen. */

	/* Same problem on the OTHER root screens. The 134px above pays for the home
	   bar's second row (the search pill), but `--root:not(--home)` hides that
	   pill just above, so Categories / Deals / Order History / Account render a
	   ONE-row 70px bar and were opening with 64px of dead space under it.
	   6 + 52 (brand/icon row) + 12 = 70, +14 for the same breathing gap the
	   inner screens use. */
	body:has(.mgk-header--root:not(.mgk-header--home)) { padding-top: 84px; }
	/* No admin-bar variant here either — same double-count as above. */

	/* ── 301 Account shell — page gutter and card idiom ──────────────────
	   Every account page is a .mgk-section, whose desktop padding is
	   32px var(--mgk-pad-x). The mockup's account screens are 14px top / 16px
	   side, and the tab bar needs clearance at the bottom (the fixed
	   .mgk-tabbar is 64px + safe-area, and these pages end in a card or a
	   sticky CTA that would otherwise sit under it).

	   Scoped to the six account blocks by class rather than to .mgk-section,
	   which every page on the site uses. */
	/* The `:first-child + .elementor-element .mgk-section` rule near the top of
	   this file zeroes the FIRST section's padding-top site-wide (so a home
	   banner sits flush under the fixed header). On these account screens the
	   mockup does want its 14px — content starts 14px below the app bar — so the
	   selector is repeated here with the account class appended, which outranks
	   it and restores the design's own value. */
	.mgk-section.mgk-acct,
	.mgk-section.mgk-profile,
	.mgk-section.mgk-addr,
	.mgk-section.mgk-ohist,
	.mgk-section.mgk-wish,
	.mgk-section.mgk-rev,
	.mgk-section.mgk-acctset,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-acctset,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-acct,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-profile,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-addr,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-ohist,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-wish,
	.elementor > .elementor-element:first-child + .elementor-element .mgk-section.mgk-rev {
		padding: 14px var(--mgk-pad-x) calc(84px + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
	}

	/* Wishlist is the one that was visibly broken rather than merely
	   off-scale: .mgk-wish sets `padding: 8px 0` and centres a max-width:806px
	   column, so at 390px the heading and every card sat flush against both
	   viewport edges with no gutter at all. */
	.mgk-section.mgk-wish { align-items: stretch; }
	.mgk-wish__head,
	.mgk-wish__list,
	.mgk-wish__empty { max-width: none; }

	/* The mockup's card: 16px radius, 1px hairline, white, NO shadow. The
	   desktop .mgk-card carries a shadow and a larger radius. Scoped through
	   each account block so no other page's cards change. */
	.mgk-acct .mgk-card,
	.mgk-profile .mgk-card,
	.mgk-addr .mgk-card,
	.mgk-ohist .mgk-card,
	.mgk-wish .mgk-card,
	.mgk-rev .mgk-card {
		border: 1px solid var(--fm-line); border-radius: 16px;
		background: #FFFFFF; box-shadow: none;
	}

	/* ── 302 My Account — the hub screen (/account/) ─────────────────────
	   Mockup "My Account" (data-screen-label="My Account"), signed in:

	     · identity card — 54px blue initials disc, 17px/750 name, 12.5px
	       "email · +65 phone" ellipsised to one line, 11.5px/650 member line
	     · "Personal details" card — 16px/750 title with a blue-outlined 40px
	       "Edit profile" pill opposite, then a 2-column readout (Full name |
	       Mobile, Email spanning both) of 11.5px/650 #667085 labels above
	       13.5px/650 #101828 values
	     · one white card of 54px navigation rows — 32px #F2F4F7 icon tile,
	       14px/700 label, "›" in #98A2B3
	     · a red-outlined 40px "Sign out" pill

	   Guest: a #101828 card (18px/700 title, 13.5px #98A2B3 body, a blue
	   "Sign in" pill beside a translucent-outlined "Create account"), then the
	   same row card holding Help / Terms / Privacy.

	   This is a REAL SCREEN in the design, reached from the Account tab, with
	   Profile as one row inside it. An earlier revision of this batch mapped it
	   onto the burger-opened .mgk-profile__nav dropdown instead — that panel is
	   a different component (it overlays the page from the header) and the hub
	   had no home, so the tab went straight to the Profile edit form. It now has
	   its own page (template-parts/sections/pages/account.php, widget
	   mgk_account, seeded as /account/) and the tab bar points at it. */
	.mgk-section.mgk-acct { display: flex; flex-direction: column; gap: 12px; }

	/* Identity card */
	.mgk-acct__id { display: flex; align-items: center; gap: 13px; padding: 16px; }
	.mgk-acct__avatar {
		flex: 0 0 auto;
		display: flex; align-items: center; justify-content: center;
		width: 54px; height: 54px; border-radius: 27px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 18px; font-weight: 750;
	}
	body .mgk-acct__avatar--photo { object-fit: cover; object-position: center; }
	.mgk-acct__id-body { flex: 1 1 auto; min-width: 0; }
	.mgk-acct__name { margin: 0; font-size: 17px; font-weight: 750; color: var(--fm-ink); }
	/* email + phone is long; the mockup keeps it on one line. */
	.mgk-acct__meta {
		margin: 3px 0 0; font-size: 12.5px; color: var(--fm-muted);
		overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	}
	.mgk-acct__member { margin: 5px 0 0; font-size: 11.5px; font-weight: 650; color: var(--fm-ink-3); }

	/* Personal details card */
	.mgk-acct__details { padding: 16px; }
	.mgk-acct__details-head {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
	}
	.mgk-acct__details-title { margin: 0; font-size: 16px; font-weight: 750; color: var(--fm-ink); }
	.mgk-acct__edit {
		flex: 0 0 auto;
		display: inline-flex; align-items: center; justify-content: center;
		height: 40px; padding: 0 14px;
		border: 1.5px solid var(--fm-blue); border-radius: 20px;
		background: #FFFFFF; color: var(--fm-blue);
		font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap;
	}
	.mgk-acct__edit:active { background: #F5F8FF; }
	.mgk-acct__sum {
		display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px; margin-top: 15px;
	}
	.mgk-acct__sum-cell { min-width: 0; }
	.mgk-acct__sum-cell--wide { grid-column: 1 / -1; }
	.mgk-acct__sum-label { display: block; font-size: 11.5px; font-weight: 650; color: var(--fm-muted); }
	.mgk-acct__sum-value {
		display: block; margin-top: 4px;
		font-size: 13.5px; font-weight: 650; color: var(--fm-ink);
		word-break: break-word;
	}

	/* Navigation rows. overflow:hidden clips the first/last row's background to
	   the card's 16px radius, which is what the mockup's flush rows need. */
	.mgk-acct__menu { display: block; overflow: hidden; padding: 0; }
	.mgk-acct__row {
		display: flex; align-items: center; gap: 12px;
		width: 100%; min-height: 54px; padding: 0 15px;
		box-sizing: border-box;
		border: 0; border-bottom: 1px solid #F2F4F7;
		background: #FFFFFF; text-align: left; text-decoration: none;
		font-family: inherit; cursor: pointer;
	}
	.mgk-acct__menu > :last-child { border-bottom: 0; }
	.mgk-acct__row:active { background: #F7F8FA; }
	.mgk-acct__row-icon {
		flex: 0 0 auto;
		display: flex; align-items: center; justify-content: center;
		width: 32px; height: 32px; border-radius: 10px;
		background: #F2F4F7; color: var(--fm-ink-2);
	}
	/* The mockup draws these tiles with a single TEXT character (line 4312-4319:
	   P, ⌂, $, ●, ✓, ⚙, §, ?) at 15px/750, not with a vector icon. Swap here and
	   here only — desktop keeps the SVG set. */
	.mgk-acct__row-icon svg { display: none; }
	.mgk-acct__row-glyph {
		display: block;
		font-size: 15px; font-weight: 750; line-height: 1;
		color: var(--fm-ink-2);
	}
	.mgk-acct__row-label {
		flex: 1 1 auto; min-width: 0;
		font-size: 14px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-acct__row-chev { flex: 0 0 auto; font-size: 18px; font-weight: 700; color: #98A2B3; }

	.mgk-acct__signout {
		display: flex; align-items: center; justify-content: center;
		height: 40px; box-sizing: border-box;
		border: 1.5px solid #FDA29B; border-radius: 25px;
		background: #FFFFFF; color: #B42318;
		font-size: 14px; font-weight: 750; text-decoration: none;
	}
	.mgk-acct__signout:active { background: #FEF3F2; }

	/* Guest welcome card — the mockup's dark panel. */
	.mgk-acct__welcome { padding: 20px; border-radius: 16px; background: #101828; }
	.mgk-acct__welcome-title { margin: 0; font-size: 18px; font-weight: 700; color: #FFFFFF; }
	.mgk-acct__welcome-text {
		margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: #98A2B3;
	}
	.mgk-acct__welcome-actions { display: flex; gap: 10px; margin-top: 14px; }
	.mgk-acct__signin,
	.mgk-acct__signup {
		flex: 1 1 0; min-width: 0;
		display: inline-flex; align-items: center; justify-content: center;
		height: 40px; box-sizing: border-box; border-radius: 24px;
		font-size: 14.5px; font-weight: 700; text-decoration: none;
	}
	.mgk-acct__signin { border: 0; background: var(--fm-blue); color: #FFFFFF; }
	.mgk-acct__signin:active { transform: scale(.98); }
	.mgk-acct__signup {
		border: 1.5px solid rgba(255, 255, 255, .4); background: none; color: #FFFFFF;
	}
	.mgk-acct__signup:active { background: rgba(255, 255, 255, .08); }
	/* The guest rows carry no icon tile, so the label starts on the gutter. */
	.mgk-acct__row:not(:has(.mgk-acct__row-icon)) .mgk-acct__row-label { font-weight: 600; font-size: 15px; }

	/* ── 302b Account-nav dropdown (the header burger's panel) ────────────
	   Still present on Profile / Address book / Password / Privacy, which each
	   render the sidebar. The hub above is now the primary way into those pages,
	   but the panel remains the in-page way to move BETWEEN them, so it is
	   brought to the same row idiom rather than left as a 2-column grid of 12px
	   items. Everything else about it (fixed position, top offsets, z-index, the
	   burger that toggles it) is inherited untouched. */
	.mgk-profile__nav.is-mobile-open { grid-template-columns: 1fr; gap: 0; }
	.mgk-profile__nav {
		padding: 6px; border-radius: 16px;
		border: 1px solid var(--fm-line);
	}
	.mgk-profile__nav-item {
		min-height: 54px; padding: 0 10px; gap: 12px;
		border-radius: 12px;
		font-size: 14px; font-weight: 700; color: var(--fm-ink);
		white-space: normal;
	}
	/* The mockup's 32px rounded-square icon tile behind each glyph. */
	.mgk-profile__nav-item .mgk-profile__nav-icon {
		width: 32px; height: 32px; border-radius: 10px;
		background: #F2F4F7; color: var(--fm-ink-2);
	}
	.mgk-profile__nav-item.is-active {
		background: var(--fm-blue-bg); color: var(--fm-blue);
	}
	.mgk-profile__nav-item.is-active .mgk-profile__nav-icon {
		background: #FFFFFF;
	}
	/* Sign out is the mockup's red-outlined pill, set apart from the rows
	   above it by a hairline rather than sitting flush in the list. */
	.mgk-profile__nav-item--signout {
		margin-top: 6px; padding-top: 0;
		border-top: 1px solid #F2F4F7;
		color: #B42318;
	}
	.mgk-profile__nav-item--signout .mgk-profile__nav-icon {
		background: #FEF3F2; color: #B42318;
	}
	/* The chevron the mockup puts at the end of every row. The markup has no
	   element for it, so it is drawn here — on the row, not the label, so it
	   pins to the right edge regardless of how the label wraps. Suppressed on
	   Sign out, which the mockup renders as a terminal action, not a link. */
	.mgk-profile__nav-item::after {
		content: '›'; margin-left: auto;
		font-size: 18px; font-weight: 700; line-height: 1;
		color: #98A2B3;
	}
	.mgk-profile__nav-item--signout::after { content: none; }

	/* ── 303 My Profile ──────────────────────────────────────────────────
	   Mockup "My Profile": an identity card (48px initials disc, 16px/700 name,
	   12.5px "Member since …"), then a "Personal details" card whose fields are
	   a 2-column label/value grid — 12px/600 #667085 label above a 14px/600
	   #101828 value — and, in edit mode, 48px inputs with 12px radius and a
	   13.5px/700 #344054 label above each.

	   The real page is always in edit mode (see profile.php's header comment),
	   so the input styling below is the one that shows. The mockup's own
	   view/edit toggle has no counterpart here and none is added — that is a
	   behaviour change, not a responsive one. */
	/* .mgk-profile__layout sets `align-items: flex-start` for the desktop
	   two-column layout. At ≤900px it also becomes `flex-direction: column`,
	   which turns that align-items into a CROSS-AXIS (width) constraint: the
	   main column shrink-wrapped to its content instead of filling the page.
	   Measured at 390px: layout 358px, .mgk-profile__main 302.9px — so every
	   card on Profile, Password and Privacy stopped ~55px short of the right
	   gutter. `stretch` is what makes the column full-width. */
	.mgk-profile__layout { gap: 12px; align-items: stretch; }
	.mgk-profile__main { gap: 12px; width: 100%; min-width: 0; }

	/* Identity card — mockup line 3322-3325, verbatim:
	     card   padding:16px; display:flex; align-items:center; gap:12px
	     avatar 48×48; border-radius:24px; #0E42D2; 17px/700 white initials
	     body   flex:1 — 16px/700 name, then 12.5px #667085 "Member since …"
	            at margin-top:2px. NO email/phone line.
	     Edit   40px pill, 1.5px #0E42D2 border, 13.5px/700 blue — in THIS card.
	   It is deliberately card-less on desktop (see the .mgk-profile__hero
	   comment above), so the card chrome is added here. */
	.mgk-profile__hero {
		gap: 12px; padding: 16px;
		border: 1px solid var(--fm-line); border-radius: 16px;
		background: #FFFFFF;
	}
	.mgk-profile__avatar {
		width: 48px; height: 48px; border-radius: 24px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 17px; font-weight: 700;
	}
	.mgk-profile__hero-body { gap: 0; min-width: 0; flex: 1 1 auto; }
	.mgk-profile__name { font-size: 16px; font-weight: 700; color: var(--fm-ink); }
	/* The phone design's identity card carries only the name and the member
	   line — email and phone appear in the Personal-details readout below, so
	   repeating them here is a duplicate the mockup does not have. */
	.mgk-profile__contact { display: none; }
	.mgk-profile__member { margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--fm-muted); }
	/* The loyalty-tier chip is not in the phone design's identity card. */
	.mgk-profile__tier { display: none; }

	/* Details card — mockup line 3327-3330:
	     card  padding:16px
	     title 15px/700 #101828 ("Personal details", sentence case)
	     grid  1fr 1fr; gap:14px; margin-top:12px
	     label 12px/600 #667085   value 14px/600 #101828 at margin-top:3px */
	.mgk-profile__details { padding: 16px; }
	.mgk-profile__details-head { margin-bottom: 12px; flex-wrap: nowrap; }
	.mgk-profile__details-title { font-size: 15px; font-weight: 700; color: var(--fm-ink); }
	/* Sentence case here, Title Case on desktop — see the note in profile.php. */
	.mgk-profile__details-title[data-mgk-phone-label] { font-size: 0; }
	.mgk-profile__details-title[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label);
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
	}
	/* The mockup's Edit affordance: a blue-outlined 40px pill, not a text link.
	   JS hides it while editing (it is the [data-mgk-profile-edit] trigger). */
	.mgk-profile__edit {
		flex: 0 0 auto;
		display: inline-flex; align-items: center; justify-content: center;
		height: 40px; padding: 0 16px;
		border: 1.5px solid var(--fm-blue); border-radius: 22px;
		background: #FFFFFF; color: var(--fm-blue);
		font-family: inherit; font-size: 13.5px; font-weight: 700;
		cursor: pointer; white-space: nowrap;
	}
	.mgk-profile__edit:active { background: #F5F8FF; }
	.mgk-profile__edit[hidden] { display: none; }

	/* VIEW MODE readout — 2-up, 14px gap, 12px/600 #667085 label over a
	   14px/600 #101828 value at margin-top:3px (mockup line 3329-3333). */
	.mgk-profile__fields { gap: 14px; }
	/* gap:0 — the desktop rule makes each field a flex column with `gap: 4px`,
	   which stacked on top of the value's own `margin-top: 3px` and made every
	   readout row 4px taller than the design (measured rows 58/44/40 against the
	   mockup's 54/36/36, i.e. a details card 16px too tall). The 3px margin is
	   the mockup's only label→value separation. */
	.mgk-profile__field { min-width: 0; gap: 0; }
	.mgk-profile__field-label {
		font-size: 12px; font-weight: 600; color: var(--fm-muted);
	}
	.mgk-profile__field-value {
		font-size: 14px; font-weight: 600; color: var(--fm-ink);
		margin-top: 3px;
		/* break-all, as the mockup's Email cell uses, so a long address wraps
		   inside its half-width cell instead of widening the grid. */
		word-break: break-all;
	}

	/* The phone readout is FIVE fields with sentence-case labels; the shared
	   data core carries eight in Title Case for desktop. profile.php marks the
	   difference rather than forking the data:
	     · --deskonly            → Display Name / Gender / Preferred language
	     · data-mgk-phone-label  → the sentence-case label
	     · data-mgk-phone-value  → the +65-prefixed Mobile readout
	   Both swaps use content:attr() so the DOM text stays intact for desktop,
	   for the AJAX handlers that repopulate these nodes, and for the <label>'s
	   association with its input. */
	.mgk-profile__field--deskonly { display: none; }
	.mgk-profile__field-label[data-mgk-phone-label] { font-size: 0; }
	.mgk-profile__field-label[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label);
		font-size: 12px; font-weight: 600; color: var(--fm-muted);
	}
	/* View mode only: in edit mode the input carries the bare local number and
	   its own label already says (+65). */
	[data-mgk-profile-mode="view"] .mgk-profile__field-value[data-mgk-phone-value] { font-size: 0; }
	[data-mgk-profile-mode="view"] .mgk-profile__field-value[data-mgk-phone-value]::after {
		content: attr(data-mgk-phone-value);
		font-size: 14px; font-weight: 600; color: var(--fm-ink);
	}
	/* This block re-styles the SAME chip the unscoped rule above turns on at
	   every width, to match this breakpoint's own "Edit personal details"
	   card mockup (D0D5DD border, 48px boxes — see the EDIT MODE section
	   below) instead of the desktop-default field colours. */
	[data-mgk-profile-mode="edit"] .mgk-profile__phone-row {
		display: flex; align-items: center; gap: 6px; padding: 0 14px;
	}
	/* flex/width reset is the part that's easy to drop copying this from
	   Checkout's .mgk-field__phone-row input — without it the input keeps its
	   own `width: 100%` (from the shared .mgk-profile__field-input rule) and
	   overflows past the "+65" chip's flex space, reading as a second,
	   offset box inside the row instead of one continuous field. */
	[data-mgk-profile-mode="edit"] .mgk-profile__phone-row .mgk-profile__field-input {
		border: none; background: transparent; padding: 0; margin-top: 0; height: 100%;
		flex: 1 1 auto; width: auto; min-width: 0;
	}
	/* The input's own .mgk-profile__field-input:focus rule (border-color +
	   box-shadow, used by every other field on this page) would otherwise
	   draw its own glow INSET inside the row's border — a second, offset ring
	   around just the digits. Suppress it here and move the glow to the row
	   itself instead, so focus draws exactly one outline around "+65 ⏐ digits"
	   together — same split Checkout uses (span.mgk-field__phone-row:focus-within). */
	[data-mgk-profile-mode="edit"] .mgk-profile__phone-row .mgk-profile__field-input:focus {
		outline: none; border-color: transparent; box-shadow: none;
	}
	[data-mgk-profile-mode="edit"] .mgk-profile__phone-prefix {
		display: inline-flex; flex: 0 0 auto; font-size: 14px; color: var(--mgk-text-2, #667085);
	}
	/* ── EDIT MODE — the mockup's "Edit personal details" card ────────────
	   Mockup lines 3339-3352, verbatim:

	     card   padding:16px; display:flex; flex-direction:column; gap:12px
	     label  font-size:13.5px; font-weight:700; color:#344054
	     input  margin-top:6px; width:100%; height:48px;
	            border:1.5px solid #D0D5DD; border-radius:12px;
	            padding:0 14px; font-size:16px; color:#101828
	     error  color:#B42318; font-size:12.5px; font-weight:600; margin-top:5px
	     pair   display:grid; grid-template-columns:1fr 1fr; gap:10px
	            (Date of birth | Nationality — the ONLY 2-up row)
	     select same box, padding:0 10px
	     actions display:flex; gap:10px; margin-top:4px — two flex:1 40px pills

	   So the form is a stack of FULL-WIDTH fields with one 2-up pair, at a 12px
	   row gap — not the 14px 2-up grid the readout uses. A 2-column grid
	   expresses both: full-width fields span 1/-1, the pair takes a cell each.
	   Row gap 12px (the card's gap), column gap 10px (the pair's).

	   An earlier revision kept .mgk-grid--2's 14px grid and only forced inputs
	   to span — close, but the wrong row rhythm and the wrong label scale. */
	[data-mgk-profile-mode="edit"] .mgk-profile__fields {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px 10px;
	}
	/* Edit-mode labels: 13.5px/700 #344054. Where a phone label is swapped in via
	   ::after (see the content:attr() block above), the size must land on the
	   PSEUDO-ELEMENT — setting it on the label itself would undo the `font-size:
	   0` that hides the desktop text and both strings rendered
	   ("Full NameFull name"). */
	[data-mgk-profile-mode="edit"] .mgk-profile__field-label:not([data-mgk-phone-label]) {
		font-size: 13.5px; font-weight: 700; color: var(--fm-ink-2);
	}
	[data-mgk-profile-mode="edit"] .mgk-profile__field-label[data-mgk-phone-label]::after {
		font-size: 13.5px; font-weight: 700; color: var(--fm-ink-2);
	}
	[data-mgk-profile-mode="edit"] .mgk-profile__field { grid-column: 1 / -1; }
	/* The mockup's single 2-up pair. These two are adjacent in the field order
	   (profile.php's $mgk_fields), so they pair by their own ids with no DOM
	   reordering. */
	[data-mgk-profile-mode="edit"] .mgk-profile__field:has(#mgk-profile-dob),
	[data-mgk-profile-mode="edit"] .mgk-profile__field:has(#mgk-profile-nationality) {
		grid-column: auto;
	}
	.mgk-profile__field-input,
	[data-mgk-profile-mode="edit"] .mgk-profile__phone-row {
		box-sizing: border-box;
		width: 100%; height: 48px; margin-top: 6px;
		border: 1.5px solid #D0D5DD; border-radius: 12px;
		background: #FFFFFF;
	}
	.mgk-profile__field-input {
		padding: 0 14px;
		/* 16px exactly: iOS Safari zooms the whole page when a focused input's
		   text is smaller than 16px, which on these forms threw the layout off
		   centre and could not be zoomed back. */
		font-size: 16px; color: var(--fm-ink);
	}
	.mgk-profile__field-input:focus,
	[data-mgk-profile-mode="edit"] .mgk-profile__phone-row:focus-within {
		border-color: var(--fm-blue); outline: none;
		box-shadow: 0 0 0 3px rgba(14, 66, 210, .18);
	}
	/* Selects share the input's box. The right pad is larger than the mockup's
	   0 10px because these are NATIVE selects drawing their own caret inside
	   the box — at 157px (the DOB/Nationality pair) "Select nationality" ran
	   straight under it. The mockup's control has its caret outside the text
	   run, so this reaches the same result with a real <select>. */
	select.mgk-profile__field-input { padding: 0 30px 0 10px; text-overflow: ellipsis; }
	/* Invalid state — the mockup swaps the border to #FDA29B and prints a
	   12.5px/600 #B42318 message under the field (theme sets .is-invalid). */
	.mgk-profile__field-input.is-invalid { border-color: #FDA29B; }
	.mgk-profile__field-err {
		margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #B42318;
	}
	/* The date field is a 3-element stack (real input + display proxy + icon,
	   see the "Date of Firth field" comment above); the proxy is what shows, so
	   it needs the same box, and the icon must stay inside it. */
	.mgk-profile__field-datewrap { display: block; position: relative; }
	.mgk-profile__field-dateproxy { padding-right: 44px; }
	.mgk-profile__field-dateicon {
		position: absolute; right: 12px; top: 50%;
		transform: translateY(calc(-50% + 3px));
		pointer-events: none;
	}
	.mgk-profile__field-dateicon svg { width: 20px; height: 20px; }

	/* Save / Cancel — the mockup's two flex:1 40px pills sharing one row, at
	   `gap:10px; margin-top:4px` (the card's own 12px gap supplies the rest of
	   the separation, so a larger margin here double-counts it). */
	.mgk-profile__save-row { gap: 10px; margin-top: 4px; }
	.mgk-profile__save-row .mgk-btn {
		flex: 1 1 0; min-width: 0;
		height: 40px; padding: 0; border-radius: 24px;
		font-size: 15px; font-weight: 700;
	}
	.mgk-profile__save-row .mgk-btn--blue {
		background: var(--fm-blue); border-color: var(--fm-blue);
	}
	.mgk-profile__save-row .mgk-btn--outline {
		background: #FFFFFF; border: 1.5px solid #D0D5DD; color: var(--fm-ink-2);
	}
	.mgk-profile__actions-row { display: flex; margin-top: 4px; }
	.mgk-profile__actions-row .mgk-btn {
		flex: 1 1 auto;
		height: 40px; border-radius: 25px;
		font-size: 15px; font-weight: 700;
	}

	/* ── 303b "Account settings" row ───────────────────────────────────────
	   Mockup line 3355, verbatim: min-height:52px, 1px #E4E7EC border,
	   radius 14px (not the cards' 16px), label 15px/700, muted chevron.
	   It sits below the details card in BOTH view and edit mode. The screen
	   wrapper is a 12px-gap flex column, so the separation comes from the
	   gap — this must not add its own top margin (desktop's wrapper gap is
	   20px, which is why the row first sat 32px below the card). Hidden
	   above 640px near the top of this file. */
	.mgk-profile__profile-view { gap: 12px; }
	.mgk-profile__settings-row {
		display: flex; align-items: center; justify-content: space-between;
		box-sizing: border-box;
		min-height: 52px; padding: 0 16px;
		border: 1px solid var(--fm-line); border-radius: 14px;
		background: #FFFFFF; text-decoration: none;
	}
	.mgk-profile__settings-label {
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-profile__settings-chev {
		font-size: 20px; font-weight: 700; color: var(--fm-muted); line-height: 1;
	}

	/* Avatar camera affordance — 26px, on the disc's edge, per the mockup.
	   It is an EDIT affordance: the mockup's read-only profile shows a bare
	   disc, so it is hidden in view mode (the desktop rule already gates the
	   other edit-only controls on the same attribute). */
	.mgk-profile__avatar-wrap { position: relative; flex: 0 0 auto; }
	.mgk-profile__avatar-edit {
		position: absolute; right: -2px; bottom: -2px;
		width: 26px; height: 26px; padding: 0;
		border: 2px solid #FFFFFF; border-radius: 13px;
		font-size: 11px; line-height: 1;
	}
	[data-mgk-profile-mode="view"] .mgk-profile__avatar-edit { display: none; }

	/* The date field's calendar icon is positioned against .mgk-profile__field-
	   datewrap, which view mode hides — but the icon is absolutely positioned,
	   so it escaped and floated loose under "Date of Birth" (visible at 390px).
	   Hiding the wrapper's contents in view mode too keeps it with its input. */
	[data-mgk-profile-mode="view"] .mgk-profile__field-dateicon { display: none; }

	/* Identity row: 54px disc BESIDE the name block, per the mockup. The base
	   .mgk-profile__hero is a flex row, but .mgk-profile__name is an <h2> whose
	   theme margin pushed the text onto its own line at this width. */
	.mgk-profile__hero { flex-direction: row; align-items: center; }
	.mgk-profile__name { margin: 0; }
	.mgk-profile__contact, .mgk-profile__member { margin: 0; }

	/* ── 304 Change password ─────────────────────────────────────────────
	   Mockup "Change password": ONE card holding the three 48px password
	   inputs, each with a 13.5px/700 label, an 8px+ hint under "New password",
	   a full-width 40px blue "Save password" pill, and a plain-text "Forgot
	   your current password?" link below it.

	   What the baseline did at 390px instead (verified): .mgk-profile__pwpanel
	   is a flex ITEM of .mgk-profile__layout, which at this width is a column,
	   so the panel took its own max-content width — the card stopped at ~440px
	   of a 390px viewport, i.e. it neither filled the screen nor fit it, and
	   the inputs inside were ~370px wide against a 358px content box. */
	.mgk-profile__pwpanel {
		box-sizing: border-box;
		width: 100%; max-width: none; padding: 16px; gap: 12px;
		display: flex; flex-direction: column;
		border: 1px solid var(--fm-line); border-radius: 16px;
		background: #FFFFFF;
	}
	/* The app bar already reads "Change password", so the mockup's card has NO
	   heading of its own. Desktop has no app-bar title and still needs one, so
	   it is hidden here rather than removed from the template. */
	.mgk-profile__pw-title { display: none; }
	.mgk-profile__pw-input {
		box-sizing: border-box;
		width: 100%; height: 48px; margin-top: 6px; padding: 0 14px;
		border: 1.5px solid #D0D5DD; border-radius: 12px;
		font-size: 16px; color: var(--fm-ink); background: #FFFFFF;
	}
	.mgk-profile__pw-input:focus {
		border-color: var(--fm-blue); outline: none;
		box-shadow: 0 0 0 3px rgba(14, 66, 210, .18);
	}
	.mgk-profile__pwpanel .mgk-profile__field-label {
		font-size: 13.5px; font-weight: 700; color: var(--fm-ink-2);
	}
	/* Helper line under "New password" (mockup line 3384): 12px, muted, 5px
	   below the input. The field is a flex column, so the input's own 6px
	   margin-top does not apply to this — it needs its own offset. */
	.mgk-profile__pw-help {
		display: block;
		margin: 5px 0 0;
		font-size: 12px; line-height: 1.45; color: var(--fm-muted);
	}
	/* "Save password" is full-width in the mockup, not the desktop pill's 144px
	   min-width, and the row must not cap it. */
	.mgk-profile__pwpanel .mgk-profile__actions-row { display: block; margin-top: 0; }
	.mgk-profile__pwpanel [data-mgk-pw-save] {
		box-sizing: border-box;
		display: flex; align-items: center; justify-content: center;
		width: 100%; min-width: 0; height: 40px; padding: 0;
		border-radius: 25px;
		font-size: 15px; font-weight: 700;
		/* Mockup blue (#0E42D2), not desktop's #165DFF. The desktop rule sets
		   both background and border-color, so both need restating. */
		background: var(--fm-blue); border-color: var(--fm-blue);
	}
	/* Plain blue text link, centred under the button (mockup line 3391). */
	.mgk-profile__pw-forgot {
		display: flex; align-items: center; justify-content: center;
		min-height: 40px;
		font-size: 13.5px; font-weight: 700; color: var(--fm-blue);
		text-decoration: none; background: none; border: none;
	}
	/* Status banner — the mockup's success/failure block: 12px radius, 12/14px
	   padding, 14px/700 title. The panel drives it by class, so only the box
	   is restyled here. */
	.mgk-profile__pw-status {
		border-radius: 12px; padding: 12px 14px;
		font-size: 13px; line-height: 1.45;
	}

	/* ── 305 Addresses ───────────────────────────────────────────────────
	   Mockup "Addresses": one card per address — 15px/700 label, a blue
	   "Default" chip beside it, then "Edit" as blue TEXT and a red 🗑 at the
	   right edge, then the recipient (13.5px/600), postal (13px muted) and the
	   street line (13.5px #475467) — and a full-width 40px blue "Add new
	   address" pill pinned to the bottom of the screen.

	   The baseline put that CTA next to the heading, which at 390px squeezed
	   "Address book" and the button onto one 358px line. */
	.mgk-addr { gap: 12px; }
	/* The mockup pins "Add new address" to the BOTTOM of the screen, but the
	   markup emits it inside .mgk-addr__head, which sits in a
	   .mgk-addr__view wrapper BEFORE the one holding the list — so
	   `position: sticky` alone pinned it directly under the heading at the TOP
	   (verified at 390px).

	   Dissolving both wrappers with display:contents promotes the heading, the
	   button and the list to items of the .mgk-addr flex column, which lets
	   `order` put the button last without moving it in the DOM (it stays
	   adjacent to the heading for screen readers and keeps its
	   data-mgk-addr-add handler). The form/delete-modal views are excluded —
	   they are overlays with their own layout, and dissolving them would drop
	   their positioning context. */
	.mgk-addr > .mgk-addr__view { display: contents; }
	/* …but `hidden` must still win. Opening the Add/Edit form makes the JS set
	   [hidden] on both list views (mgk-retail.js ~3429); a bare
	   `display: contents` overrides the UA's `[hidden] { display: none }`, so
	   the address list reappeared UNDER the open form. */
	.mgk-addr > .mgk-addr__view[hidden] { display: none; }
	.mgk-addr__head { display: contents; }
	/* The app bar now carries the screen title ("Addresses", § 300), so the
	   in-page heading was a second copy of it two lines apart. The mockup's
	   Addresses screen has no in-page heading at all — the bar IS the heading.
	   Kept in the DOM for desktop, which has no app-bar title. */
	.mgk-addr__heading { display: none; }
	.mgk-addr__list { order: 1; gap: 12px; }
	.mgk-addr__empty { order: 1; }
	.mgk-addr__item { padding: 14px 16px; }
	.mgk-addr__item-head { align-items: center; gap: 8px; flex-wrap: wrap; }
	/* Mockup card lines (3406-3412): the LABEL titles the card at 15px/700,
	   then "recipient · phone" at 13.5px/600, then a muted postal line, then
	   the street. Desktop's name | phone head is hidden here (it is the same
	   two values, re-composed into __who) and the label takes its place. */
	.mgk-addr__label { display: inline; font-size: 15px; font-weight: 700; color: var(--fm-ink); }
	.mgk-addr__name,
	.mgk-addr__sep,
	.mgk-addr__phone { display: none; }
	.mgk-addr__who {
		display: block; margin: 6px 0 0;
		font-size: 13.5px; font-weight: 600; color: var(--fm-ink-2);
	}
	/* Mockup reads "Postal code 079903" — one muted 13px line, sentence case,
	   with no separately-weighted caption. The template supplies that copy in
	   data-mgk-phone-postal; swapping via ::after keeps the desktop DOM text
	   (and its bold "Postal Code" caption) untouched. */
	.mgk-addr__postal { font-size: 13px; color: var(--fm-muted); margin-top: 4px; }
	/* The DOM text node is " 018956" — note the LEADING space before the
	   number. font-size:0 collapses the glyphs but that space is a separate
	   text node rendered at the PARENT's size, so the ::after line started
	   ~14px in while every other line sat flush left. word-spacing:0 does not
	   remove a leading space; zeroing the line's own font-size AND indent is
	   what actually kills it, so the swapped text is emitted as a block whose
	   ::after carries its own font-size. */
	.mgk-addr__postal[data-mgk-phone-postal] {
		font-size: 0; word-spacing: 0; text-indent: 0;
	}
	.mgk-addr__postal[data-mgk-phone-postal] > span { display: none; }
	.mgk-addr__postal[data-mgk-phone-postal]::after {
		content: attr(data-mgk-phone-postal);
		font-size: 13px; font-weight: 400; color: var(--fm-muted);
	}
	.mgk-addr__addr { font-size: 13.5px; color: var(--fm-ink-3); line-height: 1.45; margin-top: 2px; }
	/* The "default" chip is pink/red in the baseline (the markup gives it
	   .mgk-chip--red, not --default); the mockup's is blue. Targeted through
	   its own data attribute so no other red chip on the page changes. */
	.mgk-addr__item [data-mgk-addr-default-chip] {
		background: var(--fm-blue-bg); color: var(--fm-blue);
		border: 1px solid var(--fm-blue-bd);
		font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
		/* Markup writes it lowercase ("default"); the mockup shows "Default".
		   Capitalising in CSS avoids touching the shared desktop markup. */
		text-transform: capitalize;
	}
	/* Edit/Delete: 40px hit targets (the mockup's, and the minimum for a
	   thumb), pushed to the right edge of the row.

	   The mockup labels Edit with the WORD "Edit" in blue (13px/700) and keeps
	   only Delete as a glyph. The markup gives both a 16px pencil/trash SVG, so
	   the pencil is swapped for text here: the SVG is hidden and the word comes
	   from ::after. Both buttons keep their aria-label, so the accessible name
	   is unchanged either way. */
	/* Markup nests the text and the Edit/Delete buttons as two side-by-side flex
	   COLUMNS, so the text column shrink-wrapped to its longest unbreakable run —
	   141px of a 326px content box — and every line wrapped far earlier than the
	   design. flex:1 1 auto + min-width:0 lets it take all the room the two 40px
	   buttons leave.
	
	   Taking the buttons out of flow goes further: as an in-flow flex sibling the
	   actions column reserves its ~82px down the WHOLE card height, so the three
	   text lines stopped short even though nothing sits beside them. Only the
	   label row needs to avoid the buttons, which it does with its own
	   padding-right, so the text gets the full 324px.
	
	   (display:contents on both wrappers was tried and rejected: it makes the
	   text lines siblings of the buttons, so they lay out side by side instead
	   of stacking.) */
	.mgk-card.mgk-addr__item { position: relative; }
	.mgk-addr__item-body { flex: 1 1 auto; min-width: 0; }
	.mgk-addr__item-actions {
		/* Offsets resolve against the card's PADDING box, whose origin is inside
		   the 1px border but NOT inside the padding — so the card's own 14px/16px
		   padding has to be restated here for the buttons to sit level with the
		   label row rather than 14px above it. */
		position: absolute; top: 14px; right: 16px;
		gap: 2px;
	}
	/* Room for the two 40px buttons + their 2px gap. */
	.mgk-addr__item-head { padding-right: 90px; }
	.mgk-addr__iconbtn {
		width: 40px; height: 40px; border-radius: 12px;
		display: inline-flex; align-items: center; justify-content: center;
		color: var(--fm-blue);
	}
	.mgk-addr__iconbtn:not(.mgk-addr__iconbtn--delete) { width: auto; padding: 0 8px; }
	.mgk-addr__iconbtn:not(.mgk-addr__iconbtn--delete) svg { display: none; }
	.mgk-addr__iconbtn:not(.mgk-addr__iconbtn--delete)::after {
		content: 'Edit'; font-size: 13px; font-weight: 700; color: var(--fm-blue);
	}
	.mgk-addr__iconbtn--delete { color: #B42318; }
	.mgk-addr__iconbtn--delete svg { width: 18px; height: 18px; }
	.mgk-addr__iconbtn:active { background: #F2F4F7; }
	.mgk-addr__iconbtn--delete:active { background: #FEF3F2; }
	/* Sticky bottom CTA, per the mockup. It sits above the tab bar, which is
	   itself fixed at 64px + safe-area — hence the offset, and hence the extra
	   bottom padding § 301 puts on the page. `order: 2` is what moves it below
	   the list (see the display:contents note on __head above); without it the
	   button is a DOM sibling of the heading and sticks to the TOP instead. */
	.mgk-addr__add {
		order: 2;
		position: sticky;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
		display: flex; align-items: center; justify-content: center;
		width: 100%; height: 40px; margin-top: 8px; padding: 0;
		border: 0; border-radius: 25px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 15px; font-weight: 700; text-decoration: none;
		box-shadow: 0 8px 18px rgba(14, 66, 210, .2);
	}
	.mgk-addr__add:active { transform: scale(.98); }
	/* While the Add/Edit form is open its own view is shown and the list views
	   are [hidden] — but the CTA lives inside a hidden view whose
	   display:contents children can still paint, so the sticky pill floated
	   over the form's Note field. Hiding it with the view that contains it
	   keeps the form screen clean; the form has its own Save/Cancel footer. */
	.mgk-addr > .mgk-addr__view[hidden] .mgk-addr__add,
	.mgk-addr > .mgk-addr__view[hidden] .mgk-addr__heading { display: none; }
	.mgk-addr__empty {
		padding: 48px 24px; text-align: center;
		font-size: 14px; color: var(--fm-ink-3);
	}

	/* Add/Edit form — the mockup opens it as its own screen. It is already a
	   full-screen panel here; these are the mockup's field metrics inside it.

	   The panel is a sibling of the list views rather than part of the
	   .mgk-section flow, so § 301's bottom padding does not reach it and its
	   Save/Cancel footer sat behind the fixed 64px tab bar. */
	.mgk-addrform {
		padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
	}
	.mgk-addrform__card { padding: 16px; border-radius: 16px; }
	.mgk-addrform__title { font-size: 17px; font-weight: 750; color: var(--fm-ink); }
	.mgk-addrmodal__body { gap: 12px; }
	.mgk-addrmodal__foot { gap: 10px; }
	.mgk-addrmodal__foot .mgk-btn {
		flex: 1 1 0; min-width: 0;
		height: 40px; border-radius: 24px;
		font-size: 15px; font-weight: 700;
	}

	/* ── 306 Privacy & Notifications ─────────────────────────────────────
	   Mockup "Privacy & Notifications": ONE card of 52px rows, each a
	   14.5px/600 label on the left and a 46×26px switch on the right, then a
	   blue text row "Manage cookie & PDPA settings →", and a 12.5px muted
	   footnote about PDPA consent logging under the card.

	   The baseline's rows were 18px titles with a 14px description each and
	   20px padding top and bottom — ~100px per row, so the four toggles alone
	   filled the screen. The mockup drops the descriptions; they are kept in
	   the DOM and hidden, since they are real explanatory copy the desktop
	   layout shows and nothing else on the phone replaces them.

	   CONTENT KEEP: the mockup has no "Privacy & data (PDPA)" section at all —
	   its Delete-account action lives on the Settings screen. Deleting an
	   account and managing PDPA cookie consent are the two actions Singapore's
	   PDPA requires to be reachable, and this page is where the site puts
	   them, so both rows are KEPT and restyled to the mockup's idiom rather
	   than hidden. */
	.mgk-privacy { gap: 10px; }
	.mgk-privacy__title { font-size: 16px; line-height: 1.3; font-weight: 750; color: var(--fm-ink); }
	.mgk-privacy__card { padding: 6px 16px; border-radius: 16px; border-color: var(--fm-line); }
	.mgk-privacy__row {
		min-height: 52px; padding: 8px 0; gap: 12px;
		border-bottom-color: #F2F4F7;
		flex-wrap: nowrap;
	}
	.mgk-privacy__row-title {
		font-size: 14.5px; line-height: 1.35; font-weight: 600; color: var(--fm-ink);
	}
	.mgk-privacy__row-title--danger { color: #B42318; }
	/* Dropped per the mockup — see the § note above. */
	.mgk-privacy__row-desc { display: none; }
	/* The mockup's switch is 46×26 with a 22px knob; the theme's is 36×20/16. */
	.mgk-privacy__toggle { width: 46px; height: 26px; border-radius: 13px; }
	/* Mockup's ON colour is GREEN (#067647, line 4338) — not the app blue used
	   everywhere else. */
	.mgk-privacy__toggle.is-on { background: #067647; }
	.mgk-privacy__knob {
		top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 11px;
		box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
	}
	.mgk-privacy__toggle.is-on .mgk-privacy__knob { left: 22px; }
	/* Manage / Delete — the mockup's row-end action is a pill, not a square
	   outline button, and needs a 40px hit target. */
	.mgk-privacy__btn {
		min-height: 40px; padding: 0 16px; border-radius: 22px;
		font-size: 13px; font-weight: 700; white-space: nowrap;
	}
	.mgk-privacy__btn--red { border: 1.5px solid #FDA29B; color: #B42318; }

	/* The mockup has ONE card and no section headings — the app bar already says
	   "Privacy & Notifications", so "Notifications" and "Privacy & data (PDPA)"
	   were a third and fourth title on the same screen. Hidden on phones; kept
	   for desktop, which has no app-bar title and does need the split. */
	.mgk-privacy__title { display: none; }
	/* With the headings gone the two cards should read as ONE list. The hidden
	   <h2> still sits between them in the DOM, so `.card + .card` never matches
	   — use :last-of-type/:first-of-type instead, and close the flex gap with a
	   negative margin so the seam disappears. */
	.mgk-privacy__card:not(:last-of-type) {
		border-bottom: none;
		border-bottom-left-radius: 0; border-bottom-right-radius: 0;
	}
	.mgk-privacy__card:not(:first-of-type) {
		margin-top: calc(0px - var(--mgk-privacy-gap, 10px));
		border-top: none;
		border-top-left-radius: 0; border-top-right-radius: 0;
	}
	/* Mockup line 3435: "Manage cookie & PDPA settings →" is a plain blue text
	   link filling its own 52px row, not a pill at the row end. Restyling the
	   EXISTING data-mgk-consent-open button keeps one control and one handler
	   (a second link would mean two ways into the same consent sheet). The row
	   collapses to just the link, so its title/desc are hidden and the arrow
	   comes from ::after. */
	/* The cookie row sits directly under the four toggles once the headings and
	   the card seam are gone, so it needs the same 1px rule ABOVE it that the
	   toggle rows have below them — otherwise the link floats. Its own 8px
	   vertical padding is dropped so the row measures the mockup's 52px rather
	   than 60px. */
	.mgk-privacy__row:has(> [data-mgk-consent-open]) {
		padding-top: 0; padding-bottom: 0;
		border-top: 1px solid #F2F4F7; border-bottom: none;
	}
	.mgk-privacy__row:has(> [data-mgk-consent-open]) .mgk-privacy__row-text { display: none; }
	/* The mockup's Privacy screen has NO Delete-account row — that action lives
	   on the Account settings screen (§ 312), which is where it is reachable
	   from. Hiding it here therefore removes a duplicate, not the action
	   itself, so PDPA erasure is still one tap from Settings. Kept in the DOM
	   for desktop, whose "Privacy & data (PDPA)" section owns it. */
	.mgk-privacy__row:has(> [data-mgk-profile-delete]) { display: none; }
	/* With Delete gone the cookie link is the card's last row, so its own
	   bottom rule would sit under nothing. */
	.mgk-privacy__card:last-of-type .mgk-privacy__row:last-of-type { border-bottom: none; }

	/* Mockup line 3437: 12.5px muted footnote under the card, 10px below it,
	   1.5 line-height, inset 4px so it sits slightly proud of the card edge. */
	.mgk-privacy__note {
		display: block;
		margin: 10px 0 0; padding: 0 4px;
		font-size: 12.5px; line-height: 1.5; color: var(--fm-muted);
	}
	.mgk-privacy__btn--blue {
		min-height: 52px; margin-left: 0; padding: 0;
		border: none; border-radius: 0; background: none;
		font-size: 14px; font-weight: 700; color: var(--fm-blue);
		text-align: left;
	}
	/* Swap the short desktop label ("Manage") for the mockup's full sentence,
	   arrow included. font-size:0 hides the DOM text without touching it. */
	.mgk-privacy__btn--blue[data-mgk-phone-label] { font-size: 0; }
	.mgk-privacy__btn--blue[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label) ' \2192';
		font-size: 14px; font-weight: 700; color: var(--fm-blue);
	}

	/* ── 307 Order History ───────────────────────────────────────────────
	   Mockup "Order History": a scrolling filter-tab strip with a 2.5px blue
	   underline on the active tab, then one card per order — "Order {no}" at
	   15px/700 with a coloured status chip opposite, a 12.5px muted meta line,
	   the item rows (44px thumb, 13.5px name, amount right), then a hairline
	   and a footer with "Total: <b>…</b>" left and Track / Reorder pills right.

	   The page already has a ≤640px block (see § "mgk-ohist" above) that turns
	   the desktop row into a grid and reveals .mgk-ohist__mobile-detail. That
	   structure is right; what it lacked was the mockup's scale, its chip and
	   pill shapes, and a scrolling (rather than wrapping) filter strip. */
	.mgk-ohist { gap: 12px; }
	.mgk-ohist__heading { font-size: 18px; font-weight: 750; color: var(--fm-ink); }
	/* Filters scroll on ONE row, as in the mockup — four chips ("All Orders
	   (n)" … "Cancelled (n)") wrap to three rows at 390px otherwise. The
	   right-edge bleed is paid back as padding on the SAME side so the box
	   cannot outgrow the viewport (the border-box note in Batch 1 § 101). */
	.mgk-ohist__filters {
		box-sizing: border-box;
		flex-wrap: nowrap; gap: 8px;
		overflow-x: auto; overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin-right: calc(var(--mgk-pad-x) * -1);
		padding-right: var(--mgk-pad-x);
	}
	.mgk-ohist__filters::-webkit-scrollbar { display: none; }
	.mgk-ohist__filter {
		flex: 0 0 auto;
		min-height: 40px; padding: 0 16px;
		border: 1.5px solid #D0D5DD; border-radius: 20px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 13.5px; font-weight: 700; white-space: nowrap;
	}
	.mgk-ohist__filter.is-sel {
		background: var(--fm-blue); border-color: var(--fm-blue); color: #FFFFFF;
	}
	.mgk-ohist__list { gap: 12px; }
	.mgk-ohist__order { padding: 14px 16px; }
	.mgk-ohist__order-id { font-size: 15px; font-weight: 700; color: var(--fm-ink); }
	.mgk-ohist__order-meta { font-size: 12.5px; color: var(--fm-muted); }
	.mgk-ohist__order-pill {
		font-size: 12px; font-weight: 700;
		border-radius: 12px; padding: 4px 10px;
	}
	/* The order "type" chip (Delivery / Pickup) is a second badge the mockup
	   does not carry beside the order number; the status chip already occupies
	   that slot. Hidden rather than removed — desktop shows both. */
	.mgk-ohist__order-type { display: none; }
	.mgk-ohist__mobile-detail { gap: 10px; padding-top: 10px; }
	.mgk-ohist__mobile-thumb {
		width: 44px; height: 44px; border-radius: 10px;
		border-color: var(--fm-line);
	}
	.mgk-ohist__mobile-item { align-items: center; gap: 10px; }
	.mgk-ohist__mobile-item-body { flex: 1 1 auto; min-width: 0; gap: 3px; }
	.mgk-ohist__mobile-item-name {
		font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--fm-ink);
		/* The desktop rule ellipsises this to one line; the mockup wraps it,
		   and at 390px a product name needs the second line. */
		white-space: normal; overflow: visible; text-overflow: clip;
	}
	.mgk-ohist__mobile-badges .mgk-chip {
		font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
	}
	.mgk-ohist__mobile-more {
		min-height: 40px; padding: 0;
		font-size: 13px; font-weight: 700; color: var(--fm-muted);
	}
	/* Footer: hairline above, total left, action pill right. */
	.mgk-ohist__mobile-foot {
		gap: 12px; margin-top: 2px; padding-top: 12px;
		border-top: 1px solid #F2F4F7;
	}
	/* An order with no line items (item_details empty) leaves the detail block
	   holding nothing but the footer, so its own row gap + padding-top read as a
	   dead band under the meta line. Collapse both when the footer is the only
	   child — the hairline alone then separates meta from Total. */
	.mgk-ohist__mobile-detail:not(:has(.mgk-ohist__mobile-item)) {
		gap: 0; padding-top: 0;
	}
	.mgk-ohist__mobile-total { font-size: 14px; color: var(--fm-ink); }
	.mgk-ohist__mobile-foot .mgk-ohist__reorder {
		width: auto; height: 40px; padding: 0 16px;
		border-radius: 22px;
		background: var(--fm-blue);
		font-size: 13.5px; font-weight: 700; white-space: nowrap;
	}
	.mgk-ohist__mobile-foot .mgk-ohist__reorder:active { transform: scale(.97); }
	.mgk-ohist__empty { padding: 48px 24px; font-size: 14px; color: var(--fm-ink-3); }
	/* "Back to homepage" — the mockup's account screens have no in-page back
	   link (the app bar owns Back), but this is a real WordPress page with no
	   app bar Back, so it is KEPT and just brought down to the mockup's
	   secondary-text scale. */
	/* Order History is a ROOT screen, so its app bar shows the brand, not a
	   title (see .mgk-header--root .mgk-header__title above) — the in-page
	   heading is therefore the ONLY thing naming the screen and must stay. The
	   mockup drops it because its own bar carries the title.

	   What the mockup definitely does not show is the "(F-031)" screen code, so
	   the code-free copy the template puts in data-mgk-phone-label is swapped in
	   here; the DOM text is left intact for desktop and for the editable value. */
	.mgk-ohist__heading[data-mgk-phone-label] { font-size: 0; }
	.mgk-ohist__heading[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label);
		font-size: 18px; font-weight: 750; color: var(--fm-ink);
	}
	/* The tab bar is the way back from a root screen, so the in-page
	   "Back to homepage" link is redundant here (the mockup has none). */
	.mgk-ohist__back { display: none; }

	/* ── 308 Buy again ───────────────────────────────────────────────────
	   Mockup "Buy again": a lead-in line, then one row per past item — 56px
	   thumb, name, green tag chips, price, and an "Add to cart" pill (or an
	   "Out of stock" block) at the right.

	   There is no Buy-again page in this theme; the flow is Order History's
	   per-order "Reorder", styled in § 307. Nothing to add here — noted so the
	   screen is accounted for rather than silently skipped.

	   ── 309 Account settings ────────────────────────────────────────────
	   Now a real page (/account-settings/, § 312) rather than a mapping onto
	   other screens — it is the destination of My Profile's "Account settings"
	   row, which the mockup places outside the view/edit blocks. */

	/* ── 310 Wishlist ────────────────────────────────────────────────────
	   Mockup "Wishlist": one card per saved item — 56px thumb, 14px name,
	   12.5px unit line, an "Out of stock" chip when applicable, then a row
	   holding the ± stepper (40px squares, 10px radius) on the left and the
	   line total (16px/700) on the right, a full-width 40px blue "Add to cart"
	   pill, and "Remove" as full-width red text under it.

	   The baseline (verified at 390px) had no page gutter at all (§ 301), a
	   96px image, the stepper as a segmented box, the CTA as a 12px chip and
	   Remove as a bare 🗑 glyph. */
	.mgk-wish { gap: 12px; padding: 0; }
	.mgk-wish__heading { font-size: 18px; font-weight: 750; color: var(--fm-ink); }
	.mgk-wish__list { gap: 12px; }
	/* The mockup's card is a 2-column grid on its first row (56px thumb + text)
	   and full-card-width below it (stepper row, then the actions).

	   The markup nests everything except the thumb inside .mgk-wish__body, so
	   the thumb and the text cannot be grid siblings — UNLESS __body is
	   dissolved with display:contents, which promotes ITS children
	   (__top, __controls) to items of the card's own grid. That is what lets
	   __top share row 1 with the 56px thumb while __controls spans both
	   columns on row 2 and reaches the full card width.

	   An earlier revision floated the thumb instead and gave __body
	   `overflow: hidden`; that BFC indented the whole lower half to x=99 and
	   capped the actions at 260px of the 358px card (measured at 390px), which
	   is the bug this replaces. */
	.mgk-wish__item {
		display: grid; grid-template-columns: 56px minmax(0, 1fr);
		align-items: start; column-gap: 12px; row-gap: 0; padding: 14px;
	}
	.mgk-wish__media {
		grid-column: 1; grid-row: 1;
		width: 56px; height: 56px; margin: 0;
		border-radius: 10px; border-color: var(--fm-line);
	}
	.mgk-wish__ph { font-size: 24px; }
	.mgk-wish__body { display: contents; }
	.mgk-wish__top { grid-column: 2; grid-row: 1; display: block; }
	.mgk-wish__info { display: block; }
	.mgk-wish__name {
		display: block;
		font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--fm-ink);
	}
	.mgk-wish__chips { margin-top: 4px; gap: 4px; }
	.mgk-wish__chips .mgk-chip {
		font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
	}
	/* The price pair moves out of its right-hand column and under the name, so
	   the 56px thumb + name have the full width. The mockup puts the bold
	   figure at the END of the stepper row and a muted unit line up by the
	   name; this markup emits both together in .mgk-wish__price, so the pair
	   sits under the name and the bold figure keeps the mockup's 16px/700. */
	.mgk-wish__price {
		display: flex; flex-direction: row; align-items: baseline;
		gap: 6px; margin-top: 4px;
	}
	.mgk-wish__price-now { font-size: 16px; font-weight: 700; color: var(--fm-ink); margin: 0; }
	.mgk-wish__price-each { font-size: 12.5px; color: var(--fm-muted); margin: 0; }
	/* The mockup's bottom half of the card is TWO stacked full-width blocks:
	   the stepper row, then the actions. This markup nests .mgk-wish__actions
	   INSIDE .mgk-wish__controls alongside the stepper, so a plain flex row
	   here put "Add to cart"/"Out of Stock" and "Remove" in a right-hand
	   column instead (verified at 390px). Making __controls a one-column grid
	   puts the stepper on row 1 and the actions on row 2, full width, without
	   touching the shared markup.

	   Spanning 1/-1 is what takes it under the 56px thumb as well as the text,
	   so the actions reach the full width of the card rather than only the
	   text column. */
	.mgk-wish__controls {
		grid-column: 1 / -1; grid-row: 2;
		display: grid; grid-template-columns: minmax(0, 1fr);
		align-items: center; gap: 10px; margin-top: 12px;
	}
	/* The stepper keeps the line total beside it, so it needs its own row box
	   rather than being a bare grid item. */
	.mgk-wish__item .mgk-qty { justify-self: start; }
	.mgk-wish__item .mgk-qty { display: flex; align-items: center; gap: 2px; border: 0; background: none; }
	.mgk-wish__item .mgk-qty__btn {
		width: 40px; height: 40px;
		border: 1px solid #D0D5DD; border-radius: 10px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 18px; line-height: 1;
	}
	.mgk-wish__item .mgk-qty__btn:active { background: #F2F4F7; }
	/* The mockup's stepper is three separate boxes, not a segmented control:
	   the value sits bare between two bordered squares. The base .mgk-qty__val
	   rule draws a divider on each side (for the desktop segmented box), which
	   left two stray vertical rules floating beside the number here. */
	.mgk-wish__item .mgk-qty__val {
		min-width: 32px; padding: 0; text-align: center;
		border-left: 0; border-right: 0;
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
	}
	/* Actions become two stacked full-width blocks under the stepper row. */
	.mgk-wish__actions {
		display: block; margin-top: 0; width: 100%;
	}
	.mgk-wish__add {
		box-sizing: border-box;
		display: flex; align-items: center; justify-content: center;
		width: 100%; height: 40px; padding: 0;
		border-radius: 24px; background: var(--fm-blue);
		font-size: 15px; font-weight: 700; text-decoration: none;
	}
	.mgk-wish__add:active { transform: scale(.98); }
	/* "Remove" — the mockup's full-width red text row. The markup's label is a
	   🗑 glyph, so the word is supplied here and the glyph suppressed, keeping
	   the button's accessible name (aria-label="Remove from wishlist") intact. */
	.mgk-wish__remove {
		display: flex; align-items: center; justify-content: center;
		width: 100%; min-height: 40px; margin-top: 6px; padding: 0;
		font-weight: 700; color: #B42318;
		/* font-size: 0 collapses the 🗑 glyph that IS this button's label,
		   without removing it from the accessibility tree the way
		   `display: none` would; the word below is restored at 13px. The
		   button also carries aria-label="Remove from wishlist". */
		font-size: 0;
	}
	.mgk-wish__remove::after {
		content: 'Remove';
		font-size: 13px; font-weight: 700;
	}
	/* Out-of-stock: the mockup's bordered red block, full width in the action
	   column so it reads as the disabled counterpart of "Add to cart". */
	.mgk-wish__actions .mgk-chip--red {
		display: flex; align-items: center; justify-content: center;
		width: 100%; min-height: 40px; box-sizing: border-box;
		border: 1px solid #FECDCA; border-radius: 12px;
		background: #FEF3F2; color: #B42318;
		font-size: 12px; font-weight: 700;
	}
	/* Empty state — the mockup's 64px disc, 20px title, 14px body, then a
	   "Start shopping" pill. There is no CTA in this markup; the disc and the
	   type scale are what can be matched. */
	.mgk-wish__empty { padding: 56px 24px; }
	.mgk-wish__empty-icon {
		width: 64px; height: 64px; margin: 0 auto 16px;
		display: flex; align-items: center; justify-content: center;
		border-radius: 32px; background: var(--fm-blue-bg);
		font-size: 28px;
	}
	.mgk-wish__empty-title { font-size: 20px; font-weight: 700; color: var(--fm-ink); margin: 0; }
	.mgk-wish__empty-text {
		font-size: 14px; line-height: 1.55; color: var(--fm-ink-3); margin-top: 8px;
	}

	/* ── 311 Customer Reviews ────────────────────────────────────────────
	   Mockup "Customer Reviews": a scrolling chip strip, then a summary card
	   that is a HORIZONTAL split — the 34px average, its stars and the
	   "n verified purchases" line on the left; the 5→1 distribution bars
	   (6px tall, blue, #F2F4F7 track) filling the rest — then one card per
	   review: 36px round #EFF4FF initial, 14px name, a green "✓ Verified
	   purchase" chip, stars at the right, 14px body, and a bordered pill
	   "Helpful" button.

	   The baseline stacked the summary vertically, wrapped the six filter chips
	   onto three rows, and drew the bars in amber. */
	.mgk-rev { gap: 12px; min-width: 0; }
	.mgk-rev > * { min-width: 0; }
	/* The app bar already reads "Customer Reviews" and carries its own back
	   chevron, so the in-page heading and back link are duplicates here — same
	   treatment as .mgk-addr__heading / .mgk-support__heading. The product name
	   stays: the app bar does not name the product. */
	.mgk-rev__heading { display: none; }
	.mgk-rev .mgk-rev__back { display: none; }
	.mgk-rev__product { font-size: 13px; line-height: 1.4; color: var(--fm-muted); }
	.mgk-rev__head { gap: 4px; margin-bottom: 0; }
	/* Summary: average block beside the bars, per the mockup. box-sizing is
	   restated because these boxes are content-box (the global border-box only
	   covers .mgk-fm *), so the 2×16px padding would be ADDED to the width.
	   The desktop card's 120px gap and row layout are both overridden. */
	.mgk-rev__summary {
		box-sizing: border-box;
		display: flex; flex-direction: row; align-items: center; gap: 16px;
		padding: 16px; text-align: left; min-width: 0;
	}
	.mgk-rev__score { flex: 0 0 auto; min-width: 0; }
	.mgk-rev__avg {
		text-align: center;
		font-size: 34px; font-weight: 700; line-height: 1; color: var(--fm-ink);
	}
	.mgk-rev__avg-stars {
		text-align: center;
		font-size: 14px; line-height: 1.4; letter-spacing: 1px; color: #F79009;
	}
	.mgk-rev__count {
		text-align: center;
		font-size: 11.5px; color: var(--fm-muted); margin: 0;
	}
	/* min-width: 0 on BOTH the bar column and each row is load-bearing: the bar
	   inside carries `flex: 1` with an automatic minimum size, so without it
	   the rows sized to content (measured 390px inside a 358px card) and the
	   whole document scrolled sideways to 590px. */
	.mgk-rev__dist {
		flex: 1 1 auto;
		gap: 5px; margin-top: 0;
		min-width: 0;
	}
	.mgk-rev__dist-row { gap: 8px; font-size: 11.5px; min-width: 0; }
	.mgk-rev__dist-star {
		width: 24px; text-align: left;
		font-size: 11.5px; font-weight: 600; color: var(--fm-muted);
	}
	.mgk-rev__dist-bar { height: 6px; border-radius: 3px; background: #F2F4F7; min-width: 0; }
	.mgk-rev__dist-fill { background: var(--fm-blue); border-radius: 3px; }
	.mgk-rev__dist-n { width: 32px; font-size: 11.5px; font-weight: 600; color: var(--fm-muted); text-align: right; }
	/* Sub-ratings (Freshness / Delivery / Value) are not in the mockup, but
	   they are real per-product scores with no other home on the site, so they
	   are KEPT below the summary card at the mockup's row scale. */
	.mgk-rev__subs { gap: 6px; margin-top: 0; min-width: 0; }
	.mgk-rev__sub-row { font-size: 12.5px; min-width: 0; gap: 12px; }

	/* Full-width blue pill, matching the other primary CTAs on mobile. */
	.mgk-rev__cta { margin-top: 0; }
	.mgk-btn.mgk-rev__write {
		width: 100%; min-height: 44px; height: auto;
		border-radius: 22px; font-size: 15px; font-weight: 700;
	}

	/* Chips scroll on one row — same bleed-and-pay-back as § 307. */
	.mgk-rev__filters {
		box-sizing: border-box;
		flex-wrap: nowrap; gap: 8px;
		overflow-x: auto; overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin-right: calc(var(--mgk-pad-x) * -1);
		padding-right: var(--mgk-pad-x);
	}
	.mgk-rev__filters::-webkit-scrollbar { display: none; }
	.mgk-rev__filter {
		flex: 0 0 auto;
		min-height: 40px; padding: 0 16px;
		border: 1px solid #D0D5DD; border-radius: 20px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 13.5px; font-weight: 700; white-space: nowrap;
	}
	.mgk-rev__filter.is-sel {
		background: var(--fm-blue); border-color: var(--fm-blue); color: #FFFFFF;
	}
	/* One card per review on mobile (the desktop hairline-divided rows read as
	   an undifferentiated wall at 390px). */
	.mgk-rev__list { gap: 12px; margin-top: 0; }
	.mgk-rev__item {
		padding: 14px 16px; border-bottom: none;
		border: 1px solid var(--fm-line); border-radius: 16px; background: #FFFFFF;
	}
	.mgk-rev__item-head { gap: 10px; margin-bottom: 8px; align-items: center; }
	.mgk-rev__item-who { gap: 10px; flex: 1 1 auto; min-width: 0; }
	/* Round, light-blue, blue initial — the mockup's avatar (the theme's is a
	   navy rounded square). */
	.mgk-rev__avatar {
		width: 36px; height: 36px; border-radius: 18px;
		background: var(--fm-blue-bg); color: var(--fm-blue);
		font-size: 15px; font-weight: 700;
	}
	body .mgk-rev__avatar-img { width: 36px; height: 36px; border-radius: 18px; }
	.mgk-rev__item-name { font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--fm-ink); }
	.mgk-rev__item-rating { gap: 8px; margin-bottom: 6px; }
	.mgk-rev__verified {
		font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
	}
	.mgk-rev__date { font-size: 11.5px; color: var(--fm-muted); margin-top: 0; flex: 0 0 auto; }
	.mgk-rev__item-stars { flex: 0 0 auto; font-size: 13px; line-height: 1.4; letter-spacing: 1px; color: #F79009; }
	.mgk-rev__title { font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--fm-ink); margin: 0 0 4px; }
	.mgk-rev__text { font-size: 14px; line-height: 1.55; color: var(--fm-ink-2); margin: 0; }
	.mgk-rev__photos { gap: 8px; margin: 10px 0 0; }
	body .mgk-rev__photo { width: 72px; height: 72px; border-radius: 10px; }
	/* "Helpful" becomes the mockup's bordered pill; "Report" stays plain text
	   beside it. Both need a 40px hit target. */
	.mgk-rev__actions { gap: 10px; margin-top: 10px; align-items: center; }
	.mgk-rev__helpful {
		min-height: 40px; padding: 0 14px;
		border: 1px solid #D0D5DD; border-radius: 20px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 12.5px; font-weight: 700;
	}
	.mgk-rev__report { min-height: 40px; font-size: 12.5px; font-weight: 700; color: var(--fm-muted); }
	.mgk-rev__empty { padding: 32px 16px; }
	.mgk-rev__empty-title { font-size: 15px; font-weight: 700; color: var(--fm-ink); }
	.mgk-rev__empty-text { font-size: 13.5px; color: var(--fm-ink-3); }

	/* ── 312 Account settings page ───────────────────────────────────────
	   Mockup lines 3358-3374, read verbatim. The screen wrapper is a
	   10px-gap flex column (NOT the 12px the other account screens use).
	   Rows are min-height:56px with a 14px radius; the Language card shares
	   that radius but takes 16px padding; the action row is centred with a
	   10px gap and an 8px top margin.

	   Above 640px this falls back to a plain centred link list (see the base
	   rules near the top of this file) — desktop reaches the same three
	   destinations through the account-nav sidebar, so the phone chrome and
	   the Language/actions blocks are dropped there. Those base rules set a
	   max-width, an auto margin and their own padding, all of which must be
	   undone here; the section padding itself comes from the account-screen
	   rule further up. */
	.mgk-acctset { max-width: none; margin: 0; }
	.mgk-acctset__rows { display: flex; flex-direction: column; gap: 10px; }
	.mgk-acctset__lang { display: block; }
	.mgk-acctset__actions { display: flex; }
	.mgk-acctset__row {
		display: flex; align-items: center; justify-content: space-between;
		box-sizing: border-box;
		min-height: 56px; padding: 0 16px;
		border: 1px solid var(--fm-line); border-radius: 14px;
		background: #FFFFFF; text-decoration: none;
	}
	.mgk-acctset__row-label { font-size: 15px; font-weight: 700; color: var(--fm-ink); }
	.mgk-acctset__row-chev {
		font-size: 20px; font-weight: 700; color: var(--fm-muted); line-height: 1;
	}

	.mgk-acctset__lang {
		box-sizing: border-box;
		padding: 16px;
		border: 1px solid var(--fm-line); border-radius: 14px;
		background: #FFFFFF;
	}
	.mgk-acctset__lang-title {
		margin: 0;
		font-size: 15px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-acctset__lang-chips {
		display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
	}
	.mgk-acctset__chip {
		min-height: 40px; padding: 0 18px;
		border: 1.5px solid #D0D5DD; border-radius: 22px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 14px; font-weight: 700;
	}
	/* Selected chip: blue border on a pale blue fill (mockup line 4340).
	   Reuses the [data-mgk-lang-opt] `is-active` class the existing
	   display-only handler already toggles. */
	.mgk-acctset__chip.is-active {
		border-color: var(--fm-blue); background: #EFF4FF; color: var(--fm-blue);
	}

	.mgk-acctset__actions {
		display: flex; justify-content: center; align-items: center;
		gap: 10px; margin-top: 8px;
	}
	.mgk-acctset__logout {
		display: inline-flex; align-items: center; justify-content: center;
		box-sizing: border-box;
		height: 40px; padding: 0 22px;
		border: 1.5px solid #D0D5DD; border-radius: 24px;
		background: #FFFFFF; color: var(--fm-ink-2);
		font-size: 14px; font-weight: 700; text-decoration: none;
	}
	.mgk-acctset__delete {
		height: 40px; padding: 0 22px;
		border: none; background: none; color: #B42318;
		font-size: 14px; font-weight: 700; text-decoration: underline;
	}

	/* ── 313 Account → card picker sheet ─────────────────────────────────
	   Mockup lines 3658-3673, read verbatim: a bottom sheet with 22px top
	   radius and max-height 88%, an 18px header (18px/700 title + 13px muted
	   sub + 40px × close), a scrolling body of 10px-gapped cards, and a
	   Continue bar with a 1px top rule.

	   Card row: 1.5px border / 14px radius / 12px 14px padding, an 18px radio
	   dot, an 11px "Default" chip, 14px/700 title, 12.5px muted meta, and a
	   right-aligned red "Delete" with a 40px hit target. The selected card
	   gets the blue border + filled dot; unselected stay #E4E7EC / hollow.

	   z-index 600 matches .mgk-catmenu — above the fixed header (which
	   otherwise swallows backdrop taps) but below the cookie/PDPA consent
	   layers at 100000, which must never be covered. */
	.mgk-cardsheet {
		display: block;
		position: fixed; inset: 0; z-index: 600;
		visibility: hidden; pointer-events: none;
	}
	.mgk-cardsheet.is-open { visibility: visible; pointer-events: auto; }
	.mgk-cardsheet__backdrop {
		position: absolute; inset: 0; background: rgba(16, 24, 40, .45);
		opacity: 0; transition: opacity .24s ease;
	}
	.mgk-cardsheet.is-open .mgk-cardsheet__backdrop { opacity: 1; }
	.mgk-cardsheet__sheet {
		position: absolute; left: 0; right: 0; bottom: 0;
		box-sizing: border-box;
		max-height: 88%; display: flex; flex-direction: column;
		background: #FFFFFF; border-radius: 22px 22px 0 0;
		box-shadow: 0 -8px 28px rgba(16, 24, 40, .18);
		transform: translateY(100%); transition: transform .28s ease;
	}
	.mgk-cardsheet.is-open .mgk-cardsheet__sheet { transform: translateY(0); }

	.mgk-cardsheet__head {
		display: flex; align-items: flex-start; justify-content: space-between;
		gap: 8px; padding: 18px 18px 8px; flex: 0 0 auto;
	}
	.mgk-cardsheet__title {
		margin: 0; font-size: 18px; font-weight: 700; color: var(--fm-ink);
		line-height: 1.3;
	}
	.mgk-cardsheet__sub {
		margin: 2px 0 0; font-size: 13px; color: var(--fm-muted);
	}
	.mgk-cardsheet__close {
		flex: 0 0 auto;
		width: 40px; height: 40px; padding: 0;
		border: none; border-radius: 12px; background: none;
		font-size: 20px; line-height: 1; color: var(--fm-muted);
	}

	.mgk-cardsheet__body {
		flex: 1 1 auto; min-height: 0; overflow-y: auto;
		display: flex; flex-direction: column; gap: 10px;
		padding: 4px 18px 12px;
	}
	/* Dashed blue "+ Add new card" — the mockup's own idiom for this button. */
	.mgk-cardsheet__add {
		box-sizing: border-box;
		min-height: 40px; padding: 0 12px;
		border: 1.5px dashed var(--fm-blue); border-radius: 12px;
		background: #FFFFFF; color: var(--fm-blue);
		font-size: 14px; font-weight: 700;
	}
	.mgk-cardsheet__empty { margin: 0; font-size: 13.5px; color: var(--fm-muted); }
	.mgk-cardsheet__empty[hidden] { display: none; }
	.mgk-cardsheet__list { display: flex; flex-direction: column; gap: 10px; }

	/* The card rows reuse .mgk-paymethod__item so the page's JS re-render keeps
	   working, which means the desktop card styling has to be undone here. */
	.mgk-cardsheet__item {
		display: block;
		box-sizing: border-box;
		padding: 12px 14px; margin: 0;
		border: 1.5px solid var(--fm-line); border-radius: 14px;
		background: #FFFFFF; box-shadow: none;
	}
	.mgk-cardsheet__item.is-default { border-color: var(--fm-blue); }
	/* The whole row is the tap target: choosing a card IS making it default,
	   so there is no separate checkbox (the design has none). Full width and
	   text-align:left because it is a <button>, which centres by default. */
	.mgk-cardsheet__pick {
		display: flex; align-items: center; gap: 10px;
		box-sizing: border-box;
		width: 100%; min-height: 40px; margin: 0; padding: 0;
		border: none; background: none; text-align: left; cursor: pointer;
	}
	/* The set-default checkbox the page's JS contract still needs, driven by the
	   tap above — never shown, and out of the tab order. */
	.mgk-cardsheet__defsink { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
	.mgk-cardsheet__dot {
		flex: 0 0 auto;
		box-sizing: border-box;
		width: 18px; height: 18px; border-radius: 9px;
		border: 2px solid #D0D5DD; background: #FFFFFF;
	}
	/* Selected state comes from the row class now, not a sibling :checked. */
	.mgk-cardsheet__item.is-default .mgk-cardsheet__dot {
		border-color: var(--fm-blue); background: var(--fm-blue);
		box-shadow: inset 0 0 0 3px #FFFFFF;
	}
	.mgk-cardsheet__pick:focus-visible .mgk-cardsheet__dot {
		box-shadow: 0 0 0 3px rgba(14, 66, 210, .25);
	}
	.mgk-cardsheet__text { flex: 1 1 auto; min-width: 0; }
	.mgk-cardsheet__row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
	.mgk-cardsheet__tag {
		font-size: 11px; font-weight: 700; color: var(--fm-blue);
		background: var(--fm-blue-bg); border-radius: 8px; padding: 2px 8px;
	}
	.mgk-cardsheet__name { font-size: 14px; font-weight: 700; color: var(--fm-ink); }
	.mgk-cardsheet__meta {
		display: block; margin-top: 2px;
		font-size: 12.5px; color: var(--fm-muted);
	}
	.mgk-cardsheet__actions { display: flex; justify-content: flex-end; }
	.mgk-cardsheet__del {
		min-height: 40px; padding: 0 6px;
		border: none; background: none; color: #B42318;
		font-size: 13px; font-weight: 700;
	}

	.mgk-cardsheet__foot {
		flex: 0 0 auto;
		padding: 12px 18px calc(30px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--fm-line);
	}
	.mgk-cardsheet__cta {
		box-sizing: border-box;
		width: 100%; height: 40px; padding: 0;
		border: none; border-radius: 25px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 15px; font-weight: 700;
	}
	/* The add-card form and delete-confirm dialog are children of the sheet
	   wrapper, so they share its stacking context and must sit above the sheet
	   panel. They also need pointer events back: the wrapper only enables them
	   while .is-open, and these can be open when the sheet is not. */
	.mgk-cardsheet > .mgk-addrmodal,
	.mgk-cardsheet > .mgk-addrdel {
		position: fixed; inset: 0; z-index: 2;
		pointer-events: auto;
	}
	.mgk-cardsheet > .mgk-addrmodal[hidden],
	.mgk-cardsheet > .mgk-addrdel[hidden] { display: none; }
	/* The wrapper is visibility:hidden until open; a dialog opened from the
	   sheet must still paint, so re-assert visibility on the dialogs. */
	.mgk-cardsheet > .mgk-addrmodal:not([hidden]),
	.mgk-cardsheet > .mgk-addrdel:not([hidden]) { visibility: visible; }

	/* ── Add-new-card: bottom SHEET, not a centred dialog ────────────────
	   Mockup lines 3676-3692. The shared .mgk-addrmodal is a centred 24px-radius
	   card (24px side inset); the design wants the same full-width sheet idiom
	   as the card picker it opens from: pinned to the bottom, 22px top radius
	   only, header 18px, 12px-gapped body, and a footer with a 1px top rule
	   holding ONE full-width "Save card". */
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__dialog {
		position: absolute; left: 0; right: 0; bottom: 0;
		box-sizing: border-box;
		width: auto; max-width: none; max-height: 88%;
		display: flex; flex-direction: column;
		margin: 0; padding: 0;
		border-radius: 22px 22px 0 0;
		box-shadow: 0 -8px 28px rgba(16, 24, 40, .18);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__head {
		flex: 0 0 auto;
		align-items: center;
		padding: 18px 18px 8px; border-bottom: none;
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__title {
		font-size: 18px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__x {
		width: 40px; height: 40px; padding: 0;
		border: none; border-radius: 12px; background: none;
		font-size: 20px; line-height: 1; color: var(--fm-muted);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__body {
		flex: 1 1 auto; min-height: 0; overflow-y: auto;
		display: flex; flex-direction: column; gap: 12px;
		padding: 4px 18px 12px;
	}
	/* 13px/700 labels with a red asterisk; 48px / 12px-radius / 16px inputs. */
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__field > label {
		font-size: 13px; font-weight: 700; color: var(--fm-ink-2);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-req { color: #B42318; }
	/* .mgk-card-form__number wraps an inner .mgk-card-form__stripe that carries
	   its OWN border, radius and 10px/12px padding, so styling the wrapper too
	   produced a box inside a box and inset the field (x=31 w=328 against the
	   name input's x=18 w=354). The wrapper is therefore left as a bare
	   positioning context and the inner mount is the visible field. */
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__number {
		width: 100%; margin-top: 6px; border: none; padding: 0; background: none;
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__input,
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__stripe,
	.mgk-cardsheet > .mgk-addrmodal [data-mgk-paymethod-modal-exp],
	.mgk-cardsheet > .mgk-addrmodal [data-mgk-paymethod-modal-cvc] {
		box-sizing: border-box;
		width: 100%; height: 48px; min-height: 0; margin-top: 6px; padding: 0 12px;
		border: 1.5px solid #D0D5DD; border-radius: 12px;
		background: #FFFFFF; font-size: 16px; color: var(--fm-ink);
		display: flex; align-items: center;
	}
	/* Expiry | CVV side by side — the mockup's 1fr 1fr grid with a 10px gap
	   (the shared rule is a 16px-gap flex row). */
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__row2 {
		display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__default {
		display: flex; align-items: center; gap: 10px;
		min-height: 44px; margin: 0;
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__default input {
		width: 20px; height: 20px; margin: 0; accent-color: var(--fm-blue);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__default span {
		font-size: 14px; font-weight: 600; color: var(--fm-ink-2);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__number > .mgk-card-form__stripe { margin-top: 0; }
	.mgk-cardsheet > .mgk-addrmodal .mgk-card-form__note {
		display: block; margin: 0;
		font-size: 12px; line-height: 1.5; color: var(--fm-muted);
	}
	/* One full-width Save card above a 1px rule; Cancel is desktop-only (the ×
	   and the backdrop already dismiss on phones). */
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__foot {
		flex: 0 0 auto; display: block;
		padding: 12px 18px calc(30px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--fm-line);
	}
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__foot [data-mgk-paymethod-modal-close] { display: none; }
	.mgk-cardsheet > .mgk-addrmodal .mgk-addrmodal__foot [data-mgk-paymethod-modal-save] {
		box-sizing: border-box;
		display: flex; align-items: center; justify-content: center;
		width: 100%; min-width: 0; height: 40px; padding: 0;
		border: none; border-radius: 25px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 15px; font-weight: 700;
	}

	/* ── 314 PDPA & cookie preferences — bottom sheet ─────────────────────
	   Mockup line 3732-3756. The desktop rule (§ 4162) centres this as a 620px
	   card with 24px of viewport padding, which on a 390px screen becomes a
	   near-full-height dialog. The phone design is the same bottom sheet the
	   card picker uses: pinned to the bottom, max-height 88%, 22px top corners,
	   a scrolling body between a fixed header and a three-button footer. */
	.mgk-pdpamodal { display: block; padding: 0; }
	.mgk-pdpamodal__backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: none; }
	.mgk-pdpamodal__card {
		position: absolute; left: 0; right: 0; bottom: 0;
		width: auto; max-width: none;
		max-height: 88%; height: auto;
		display: flex; flex-direction: column;
		padding: 0; overflow: hidden;
		border-radius: 22px 22px 0 0;
	}
	/* Header: 18px 18px 4px, title 18px/700 ink, a 40px × button. The subtitle
	   moves INTO the scrolling body (mockup line 3736) — it is the first line of
	   content there, not part of the header block. */
	.mgk-pdpamodal__head {
		flex: 0 0 auto;
		align-items: center;
		gap: 10px; margin: 0; padding: 18px 18px 4px;
	}
	.mgk-pdpamodal__title { font-size: 18px; font-weight: 700; color: var(--fm-ink); margin: 0; }
	.mgk-pdpamodal__title[data-mgk-phone-label] { font-size: 0; }
	.mgk-pdpamodal__title[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label);
		font-size: 18px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-pdpamodal__sub {
		margin: 6px 0 0;
		font-size: 13px; line-height: 1.55; color: var(--fm-ink-3);
	}
	/* The mockup's copy is one sentence; ours carries a <br> for the desktop
	   two-line layout, which reads as a hard break mid-paragraph here. */
	.mgk-pdpamodal__sub br { display: none; }
	.mgk-pdpamodal__x {
		width: 40px; height: 40px;
		border-radius: 12px; background: none;
		color: var(--fm-muted); font-size: 20px;
	}
	.mgk-pdpamodal__x:hover { background: #F2F4F7; }
	/* Body scrolls; 4px 18px 12px per the mockup. The subtitle sits above the
	   cards, so it is pulled into this scroll area by re-parenting via order. */
	.mgk-pdpamodal__cats {
		flex: 1 1 auto; min-height: 0;
		gap: 10px; padding: 4px 18px 12px;
		overflow-y: auto; -webkit-overflow-scrolling: touch;
	}
	.mgk-pdpamodal__cat {
		align-items: flex-start;
		gap: 10px; padding: 14px;
		border: 1px solid var(--fm-line); border-radius: 14px;
		background: #FFFFFF;
	}
	/* Mockup keeps the locked row visually identical to the others — only the
	   toggle is dimmed (opacity .55), not the card. */
	.mgk-pdpamodal__cat.is-locked { background: #FFFFFF; border-color: var(--fm-line); }
	.mgk-pdpamodal__cat-body { display: flex; flex-direction: column; }
	.mgk-pdpamodal__cat-head { gap: 8px; margin: 0; }
	.mgk-pdpamodal__cat-name { font-size: 14.5px; font-weight: 700; color: var(--fm-ink); }
	.mgk-pdpamodal__cat-desc {
		margin: 6px 0 0;
		font-size: 12.5px; line-height: 1.5; color: var(--fm-muted);
	}
	/* Short cookie-category copy for a 390px sheet. The desktop strings are the
	   full PDPA consent language (order_processing's is what actually gates
	   purchase) and stay untouched there; these swap the rendered text without
	   changing the DOM, so the consent_type keys and every save path are
	   unaffected. */
	.mgk-pdpamodal__cat-name[data-mgk-phone-label],
	.mgk-pdpamodal__cat-desc[data-mgk-phone-label] { font-size: 0; }
	.mgk-pdpamodal__cat-name[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label);
		font-size: 14.5px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-pdpamodal__cat-desc[data-mgk-phone-label]::after {
		content: attr(data-mgk-phone-label);
		font-size: 12.5px; font-weight: 400; line-height: 1.5; color: var(--fm-muted);
	}
	/* "Required" is a square-ish blue badge here, not an uppercase pill. */
	.mgk-pdpamodal__cat-chip {
		padding: 2px 8px; border-radius: 8px;
		background: var(--fm-blue); color: #FFFFFF;
		font-size: 10.5px; font-weight: 700;
		text-transform: none; letter-spacing: 0;
	}
	.mgk-pdpamodal__toggle { width: 46px; height: 26px; border-radius: 13px; background: #E4E7EC; }
	/* GREEN when on, as everywhere else in the phone design (see § 306). */
	.mgk-pdpamodal__toggle.is-on { background: #067647; }
	.mgk-pdpamodal__toggle.is-locked { opacity: .55; }
	.mgk-pdpamodal__knob {
		top: 2px; left: 2px; width: 22px; height: 22px;
		box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
	}
	.mgk-pdpamodal__toggle.is-on .mgk-pdpamodal__knob { left: 22px; }
	.mgk-pdpamodal__audit {
		display: block;
		margin: 0; padding: 0 18px 10px;
		font-size: 12px; color: #98A2B3; text-align: center;
	}
	.mgk-pdpamodal__foot {
		flex: 0 0 auto;
		display: flex; gap: 8px;
		padding: 12px 18px calc(30px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--fm-line);
	}
	.mgk-pdpamodal__btn {
		box-sizing: border-box;
		flex: 1 1 0; min-width: 0;
		display: flex; align-items: center; justify-content: center;
		height: 40px; padding: 0;
		border-radius: 24px;
		font-size: 13.5px; font-weight: 700; white-space: nowrap;
		cursor: pointer;
	}
	.mgk-pdpamodal__btn--all { border: none; background: var(--fm-blue); color: #FFFFFF; }
	.mgk-pdpamodal__btn--all:active { transform: scale(.97); }
	.mgk-pdpamodal__btn--ess { border: 1.5px solid #D0D5DD; background: #FFFFFF; color: var(--fm-ink-2); }
	.mgk-pdpamodal__btn--save { border: 1.5px solid var(--fm-blue); background: #FFFFFF; color: var(--fm-blue); }

	/* ── 315 Help & Support ───────────────────────────────────────────────
	   Mockup line 3442-3465. The app bar titles this screen, so the in-page
	   heading gives way to the mockup's 24/7 reassurance line; the three contact
	   cards become one row each (title + value left, outline pill right) instead
	   of the desktop 3-column grid; and the FAQ becomes a +/− accordion inside a
	   single card. */
	.mgk-support { gap: 0; }
	.mgk-support__panel { padding: 0; gap: 0; border: 0; border-radius: 0; }
	.mgk-support__heading { display: none; }
	.mgk-support__intro {
		display: block; margin: 0;
		font-size: 14px; line-height: 1.5; color: var(--fm-ink-3);
	}
	/* One card per row — the desktop grid is 3-up. */
	.mgk-support__contacts {
		display: flex; flex-direction: column; gap: 10px;
		margin-top: 12px;
	}
	/* Grid, not flex: the pill must sit beside BOTH text lines. As a flex row the
	   full-width value would wrap under the pill instead of under the name. */
	.mgk-support__contact {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-rows: auto auto;
		column-gap: 10px; row-gap: 0;
		align-items: center;
		padding: 14px 16px;
		border: 1px solid var(--fm-line); border-radius: 14px;
		text-align: left;
	}
	/* The mockup's three cards are identical white; the desktop green/blue tints
	   and the icon, note and badge are all extra chrome it does not carry. */
	.mgk-support__contact--green,
	.mgk-support__contact--sfa,
	.mgk-support__contact--plain { background: #FFFFFF; border: 1px solid var(--fm-line); }
	.mgk-support__contact-icon,
	.mgk-support__contact-note,
	.mgk-support__contact-badge { display: none; }
	.mgk-support__contact-name {
		grid-column: 1; grid-row: 1; align-self: end;
		min-width: 0; margin: 0;
		font-size: 14.5px; font-weight: 700; color: var(--fm-ink);
	}
	.mgk-support__contact-desc {
		grid-column: 1; grid-row: 2; align-self: start;
		min-width: 0; margin: 2px 0 0;
		font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--fm-ink-3) !important;
	}
	.mgk-support__contact-cta {
		grid-column: 2; grid-row: 1 / span 2;
		box-sizing: border-box;
		display: flex; align-items: center; justify-content: center;
		width: auto; height: 40px; margin: 0; padding: 0 16px;
		border: 1.5px solid var(--fm-blue); border-radius: 22px;
		background: #FFFFFF; color: var(--fm-blue);
		font-size: 13px; font-weight: 700; white-space: nowrap;
	}
	.mgk-support__contact-cta:active { background: #F5F8FF; }
	/* Mockup writes the FAQ heading in sentence case (line 3452) while the editable
	   default is title case. Lowercase the whole string and re-capitalise the first
	   letter, so the label itself stays a single editable value.
	   NOT applied to the contact CTAs: "Open WhatsApp" would become "Open
	   whatsapp", and a brand name is not ours to lowercase. */
	.mgk-support__faq-title { text-transform: lowercase; }
	.mgk-support__faq-title::first-letter { text-transform: uppercase; }
	/* FAQ: the section title sits ABOVE the card in the mockup, so the wrapper
	   drops its own card chrome and the list becomes the card. */
	.mgk-support__faq {
		margin-top: 20px; padding: 0; gap: 0;
		border: 0; border-radius: 0; overflow: visible;
		background: none;
	}
	.mgk-support__faq-heading {
		margin: 0; padding: 0;
		border: 0; background: none;
	}
	.mgk-support__faq-title {
		font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--fm-ink);
	}
	.mgk-support__faq-list {
		gap: 0; margin-top: 10px;
		border: 1px solid var(--fm-line); border-radius: 16px;
		background: #FFFFFF; overflow: hidden;
	}
	.mgk-support__faq-item {
		padding: 0;
		border: 0; border-bottom: 1px solid #F2F4F7; border-radius: 0;
	}
	.mgk-support__faq-list > .mgk-support__faq-item:last-child { border-bottom: 0; }
	.mgk-support__faq-q {
		display: flex; align-items: center; justify-content: space-between;
		gap: 10px; min-height: 52px; padding: 12px 16px; margin: 0;
		font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--fm-ink);
		cursor: pointer;
	}
	.mgk-support__faq-q:active { background: #F7F8FA; }
	/* No ❓ prefix in the mockup — the +/− mark is the affordance. */
	.mgk-support__faq-qtext::before { content: none; }
	.mgk-support__faq-mark {
		display: block; flex: 0 0 auto;
		width: auto; height: auto; border: 0; transform: none; margin-top: 0;
		font-size: 18px; color: var(--fm-muted);
	}
	.mgk-support__faq-mark::after { content: '+'; }
	.mgk-support__faq-item[open] .mgk-support__faq-mark::after { content: '\2212'; }
	.mgk-support__faq-a {
		padding: 0 16px 14px; margin: 0;
		font-size: 13.5px; line-height: 1.6; color: var(--fm-ink-3);
	}
	.mgk-support__faq-more { display: none; }
	/* Floating chat FAB. The mockup's Support screen has no such button, and on a
	   390px viewport it overlaps the tab bar. The WHOLE widget goes, not just the
	   FAB — the FAB is what opens the card, so hiding it alone would leave the
	   card unreachable. WhatsApp is still one tap away via the first contact row,
	   which points at the same wa.me link. */
	.mgk-support__widget { display: none; }

	/* ── 316 Terms of Service summary — bottom sheet ──────────────────────
	   Mockup line 3774-3782. Same sheet idiom as the PDPA one (§ 314) but
	   max-height 80% and no footer — it is read-only copy, so the × and the
	   backdrop are the only ways out. */
	.mgk-termsheet { display: block; padding: 0; }
	.mgk-termsheet[hidden] { display: none; }
	.mgk-termsheet__backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: none; }
	.mgk-termsheet__card {
		position: absolute; left: 0; right: 0; bottom: 0;
		width: auto; max-width: none;
		max-height: 80%; height: auto;
		border-radius: 22px 22px 0 0;
	}
	.mgk-termsheet__head { align-items: center; gap: 10px; padding: 18px 18px 4px; }
	.mgk-termsheet__title { font-size: 18px; font-weight: 700; color: var(--fm-ink); }
	.mgk-termsheet__x {
		width: 40px; height: 40px;
		border-radius: 12px; background: none;
		color: var(--fm-muted); font-size: 20px;
	}
	.mgk-termsheet__x:hover { background: #F2F4F7; }
	.mgk-termsheet__body {
		padding: 4px 18px calc(30px + env(safe-area-inset-bottom, 0px));
		-webkit-overflow-scrolling: touch;
	}
	.mgk-termsheet__p {
		margin: 10px 0 0;
		font-size: 13.5px; line-height: 1.65; color: var(--fm-ink-3);
	}

	/* ── 317 Toast / notification ─────────────────────────────────────────
	   Mockup line 3607-3614. Pinned under the app bar rather than at the bottom
	   (where the tab bar sits), full width less a 16px gutter, and tinted per
	   kind with a round ✓/! badge. Colours from mockup lines 4091-4095. */
	.mgk-toast {
		left: 16px; right: 16px; bottom: auto;
		/* Clears the 52px inner bar; the two-row home bar is 114px, so the
		   offset follows the same body padding the header reserves. */
		top: calc(4px + var(--mgk-toast-top, 52px));
		max-width: none; transform: translate(0, -12px);
		align-items: flex-start; gap: 10px;
		padding: 12px 14px;
		border-radius: 14px;
		text-align: left;
		box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
		/* `top` animates too, so the toast tracks the app bar sliding in and out
		   instead of snapping between the two offsets mid-scroll. */
		transition: opacity .25s ease, transform .25s ease, top .25s ease;
	}
	.mgk-toast.is-in { transform: translate(0, 0); }
	/* Default (ok) — green. */
	.mgk-toast { background: #ECFDF3; border: 1px solid #ABEFC6; color: #067647; }
	.mgk-toast--warn { background: #FFFAEB; border-color: #FEDF89; color: #B54708; }
	.mgk-toast--err,
	.mgk-toast--error { background: #FEF3F2; border-color: #FECDCA; color: #B42318; }
	.mgk-toast__mark {
		display: flex; align-items: center; justify-content: center;
		flex: 0 0 auto;
		width: 22px; height: 22px; border-radius: 11px;
		background: #067647; color: #FFFFFF;
		font-size: 13px; font-weight: 700; line-height: 1;
	}
	.mgk-toast--warn .mgk-toast__mark { background: #B54708; }
	.mgk-toast--err .mgk-toast__mark,
	.mgk-toast--error .mgk-toast__mark { background: #B42318; }
	.mgk-toast__msg {
		flex: 1 1 auto;
		font-size: 13.5px; font-weight: 600; line-height: 1.45; color: inherit;
	}
	.mgk-toast__x { color: inherit; }
	/* Root screens carry the taller bar, so the toast starts below it. */
	body:has(.mgk-header--root.mgk-header--home) { --mgk-toast-top: 114px; }
	body:has(.mgk-header--root:not(.mgk-header--home)) { --mgk-toast-top: 70px; }
	/* On scroll the app bar slides away (`.mgk-header.is-hidden` →
	   translateY(-100%), line 164). Reserving its height regardless left the toast
	   stranded ~118px down the viewport with nothing above it — it read as
	   "dropped into the middle of the screen". Follow the bar up instead: no bar
	   on screen, no offset to clear. */
	body:has(.mgk-header.is-hidden) { --mgk-toast-top: 0px; }
	/* The toast is position:fixed, so — like the header itself (line 172) and
	   unlike body padding — it must clear the WP admin bar on its own. The admin
	   bar does NOT scroll away with the app bar, so its 46px always stands. */
	body.admin-bar .mgk-toast { top: calc(50px + var(--mgk-toast-top, 52px)); }
}

/* Set on <body> while the sheet is open so the page behind it cannot scroll. */
body.mgk-noscroll { overflow: hidden; }


/* Synchronize Sale page CTA button hover with Home page cards */
.mgk-sale__deal-wrap .mgk-prod:hover .mgk-prod__add-wide {
    background: #0D3985 !important;
}

/* Custom Cart Icon CSS v2 */
.mgk-header__cart svg.mgk-custom-cart-svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
}


/* --- Notification Page --- */
.mgk-notif-page { background: #FAFAFA; min-height: calc(100vh - 70px); padding: 40px 24px; box-sizing: border-box; }
.mgk-notif-page__inner { max-width: 1392px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }


.mgk-notif-page__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.mgk-notif-page__title-wrap { display: flex; flex-direction: column; gap: 4px; }
.mgk-notif-page__title { margin: 0; font-family: 'Quicksand', sans-serif; font-size: 24px; font-weight: 700; color: var(--mgk-blue); line-height: 32px; }
.mgk-notif-page__subtitle { font-family: 'Quicksand', sans-serif; font-size: 16px; font-weight: 500; color: var(--mgk-text-2); line-height: 24px; }

.mgk-notif-page__mark-all { display: flex; flex-direction: row; justify-content: center; align-items: center; padding: 6px 20px; height: 36px; border: 1px solid var(--mgk-blue); border-radius: 8px; background: transparent; cursor: pointer; font-family: 'Quicksand', sans-serif; font-size: 14px; font-weight: 500; color: var(--mgk-blue); line-height: 22px; transition: all 0.2s; white-space: nowrap; }
.mgk-notif-page__mark-all:hover { background: rgba(19, 99, 255, 0.05); }

.mgk-notif-page__panel { background: #FFFFFF; border: 1px solid var(--mgk-border-lt); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.mgk-notif-page__thead { display: flex; align-items: center; padding: 12px 24px; background: #FAFAFA; border-bottom: 1px solid var(--mgk-border-lt); }
.mgk-notif-page__col { font-family: 'Quicksand', sans-serif; font-size: 14px; font-weight: 600; color: var(--mgk-navy-900); text-transform: uppercase; }

.mgk-notif-page__tbody { display: flex; flex-direction: column; }
.mgk-notif-page__empty { padding: 40px 24px; text-align: center; color: var(--mgk-text-3); font-size: 14px; }

.mgk-notif-page__row { display: flex; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--mgk-border-lt); text-decoration: none; color: inherit; transition: background 0.2s; background: #FFFFFF; }
.mgk-notif-page__row:hover { background: var(--mgk-bg-alt); }
.mgk-notif-page__row:last-child { border-bottom: none; }

.mgk-notif-page__cell { font-family: 'Quicksand', sans-serif; font-size: 13px; line-height: 18px; color: var(--mgk-navy-900); }
.mgk-notif-page__cell--type { font-weight: 500; }
.mgk-notif-page__cell--msg { font-weight: 400; }
.mgk-notif-page__cell--order { font-weight: 600; color: var(--mgk-blue); }
.mgk-notif-page__cell--time { font-weight: 400; color: var(--mgk-text-3); }

/* Grid columns sizing */
.mgk-notif-page__col--read, .mgk-notif-page__cell--read { width: 56px; flex-shrink: 0; display: flex; align-items: center; }
.mgk-notif-page__col--type, .mgk-notif-page__cell--type { width: 200px; flex-shrink: 0; padding-right: 16px; box-sizing: border-box; }
.mgk-notif-page__col--msg, .mgk-notif-page__cell--msg { flex-grow: 1; min-width: 0; padding-right: 16px; box-sizing: border-box; }
.mgk-notif-page__col--order, .mgk-notif-page__cell--order { width: 100px; flex-shrink: 0; padding-right: 16px; box-sizing: border-box; }
.mgk-notif-page__col--time, .mgk-notif-page__cell--time { width: 110px; flex-shrink: 0; text-align: right; justify-content: flex-end; display: flex; }

.mgk-notif-page__dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.mgk-notif-page__row.is-unread .mgk-notif-page__dot { background: var(--mgk-blue); }
.mgk-notif-page__row.is-unread .mgk-notif-page__cell--msg { font-weight: 600; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .mgk-notif-page__thead { display: none; }
    .mgk-notif-page__row { flex-wrap: wrap; position: relative; padding-left: 48px; gap: 8px; }
    .mgk-notif-page__col--read, .mgk-notif-page__cell--read { position: absolute; left: 16px; top: 22px; width: auto; }
    .mgk-notif-page__col--type, .mgk-notif-page__cell--type { width: 100%; padding: 0; }
    .mgk-notif-page__col--msg, .mgk-notif-page__cell--msg { width: 100%; padding: 0; }
    .mgk-notif-page__col--order, .mgk-notif-page__cell--order { width: 100%; padding: 0; }
    .mgk-notif-page__col--time, .mgk-notif-page__cell--time { width: 100%; text-align: left; justify-content: flex-start; }
}

/* FAB Group (Back to Top & Contact) */
.mgk-fab-group {
	position: fixed;
	bottom: 24px;
	right: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 99;
}
.mgk-fab {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 20px;
	border-radius: 24px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border: 1px solid transparent;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	transition: all 0.2s ease;
}
.mgk-fab svg {
	flex-shrink: 0;
}
.mgk-fab--btt {
	background: #fff;
	color: var(--mgk-text);
	border-color: #E2E8F0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px);
}
.mgk-fab--btt.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.mgk-fab--btt:hover {
	background: #F8FAFC;
}
.mgk-fab--btt svg {
	color: var(--mgk-primary);
}
.mgk-fab--contact {
	background: #EAF0FF;
	color: #1B3A52;
	border-color: #EAF0FF;
}
.mgk-fab--contact svg {
	color: #1B3A52;
}
.mgk-fab--contact:hover {
	background: #D8E4FE;
}
.mgk-checkout__business-fields[hidden] { display: none; }
/* Unconditional, unscoped-to-width: without the :not(), this wins over
   every body{padding-top:70/110/134px} rule up top (the mechanism that
   reserves room for the position:fixed .mgk-header, see line ~198) on
   EVERY page using this template — which per the DB is nearly the whole
   site (Home, Cart, Support, Checkout, PDP...), all of which DO render
   .mgk-header. Zeroing padding-top there just tucks every page's content
   behind the fixed header. The one legitimate case this rule is FOR is a
   template use with no theme header at all (e.g. /login/, a full-bleed
   form) — scope it to only that case instead of every canvas page. */
body.page-template-elementor_canvas:not(:has(.mgk-header)) { padding-top: 0 !important; }


/* Disabled state for add-to-cart buttons when out-of-stock */
.mgk-prod__add.is-disabled,
.mgk-prod__add-wide.is-disabled {
	background-color: #C9CED6 !important;
	color: #ffffff;
	cursor: not-allowed;
	pointer-events: none !important;
}

.mgk-flashcard__buy.is-disabled,
.mgk-sale__herodeal-add.is-disabled {
	background-color: #C9CED6 !important;
	color: #ffffff !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

/* Hide back to top on checkout */
body.woocommerce-checkout #mgk-back-to-top,
body.mgk-is-checkout #mgk-back-to-top {
    display: none !important;
}
