.mgk-home { background: var(--mgk-wash); color: var(--mgk-ink); }
.mgk-home__voucher-strip { background: var(--mgk-warm); border-bottom: 1px solid #f0dfc7; }
/* Left-aligned, like the prototype's .vstrip-in, which sets no
   justify-content at all. The centred version pushed the "Today's vouchers"
   label away from the page's left edge, out of line with every other row. */
.mgk-home__voucher-strip-in { display: flex; align-items: center; gap: 10px; min-height: 54px; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.mgk-home__voucher-label { display: flex; align-items: center; gap: 6px; color: var(--mgk-ink); font-size: 12.5px; white-space: nowrap; }
.mgk-home__voucher-label svg { color: var(--mgk-red); flex: 0 0 auto; }
.mgk-home__voucher-ticket { display: flex; align-items: stretch; flex: 0 0 auto; min-width: 0; border: 1px solid #ebd6b4; border-radius: var(--mgk-radius-b); background: var(--mgk-paper); }
/* Roomier than the prototype's 5px/11px: real codes and descriptions
   ("10% off orders from S$40") are longer than the mock's, and the ticket read
   as cramped at that padding. */
.mgk-home__voucher-body { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 8px 15px 8px 16px; }
.mgk-home__voucher-code { color: var(--mgk-red); font-size: 13px; font-weight: 800; letter-spacing: .02em; line-height: 1.2; }
.mgk-home__voucher-desc { color: var(--mgk-ink-2); font-size: 11.5px; line-height: 1.35; white-space: nowrap; }
.mgk-home__voucher-stub { position: relative; display: flex; align-items: center; gap: 11px; padding: 0 14px; border-left: 1px dashed #ddc49b; }
.mgk-home__voucher-stub::before, .mgk-home__voucher-stub::after { content: ''; position: absolute; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--mgk-warm); }
.mgk-home__voucher-stub::before { top: -5px; }
.mgk-home__voucher-stub::after { bottom: -5px; }
.mgk-home__voucher-status { color: var(--mgk-ink-3); font-size: 11px; font-weight: 700; white-space: nowrap; }
.mgk-home__voucher-status.is-near { color: var(--mgk-amber); }
.mgk-home__voucher-status.is-ready { color: var(--mgk-green); }
.mgk-home__voucher-copy { display: flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--mgk-green); padding: 0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mgk-home__voucher-copy svg { width: 12px; height: 12px; }
.mgk-home__voucher-copy.is-copied { color: var(--mgk-ink-3); }
.mgk-home .mgk-pg { padding-top: 26px; padding-bottom: 72px; }
.mgk-home__hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.mgk-home__hero { --mgk-hero-veil: var(--mgk-paper); --mgk-hero-veil-opacity: 1; --mgk-hero-veil-width: 50%;
  /* The veil is set as a PERCENTAGE of a fluid hero, but the copy it has to
     cover is fixed in pixels — the paragraph is capped at 38ch and the h1
     stops growing at its clamp. So as the hero narrows the type occupies a
     larger and larger fraction and eventually escapes the veil entirely: at a
     1024px viewport the hero is 691px, where both the headline and the
     paragraph ended past 50% with the veil already at zero — sitting on bare
     photograph. A floor in the same units as the thing being covered fixes it
     for every width. 500px is where the paragraph's own end (38ch + 42px of
     padding = 366px) still meets ~.72 alpha, which is what it needs to clear
     4.5:1 over this artwork. On a wide hero the percentage is the larger of
     the two and nothing changes. */
  --mgk-hero-veil-span: max(var(--mgk-hero-veil-width), 500px); position: relative; min-height: 400px; border: 1px solid var(--mgk-line); border-radius: var(--mgk-radius); background: var(--mgk-paper); overflow: hidden; box-shadow: var(--mgk-highlight); }
/* Full width, like the prototype's .hero-img and like the two side cards below
   — NOT 68% right-aligned. At 68% the photograph has a hard left edge at 32% of
   the card, and the veil there is .807, so the join put pure white card against
   rgb(217,225,216) of veiled photo: a visible vertical line straight down the
   hero. A veil can soften what it covers; it cannot hide the boundary of the
   thing it covers. Spanning the card removes the boundary altogether, and the
   fade alone decides how much shows.
   Measured, this also reads BETTER than the cropped version: the photo scales to
   1002x619 here, so the band behind the copy is lighter than the 681x400 crop
   was, and the two lines that reach onto it improve to 4.9:1 (h1) and 4.8:1
   (lead paragraph) from 4.8 and 5.0 — every vertical framing passes.
   object-position keeps the prototype's value. The 88% is inert (there is no
   horizontal slack at this aspect ratio); the 62% spends the 219px of vertical
   slack, which is what keeps the tractor in frame. */
.mgk-home__hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 88% 62%; }
/* Owner ruling, against the reference design: a narrow veil that thickens
   toward the left edge, so the artwork reads through on its own from early on.
   The reference calls that "the left 40%", but the figure cannot be copied as a
   percentage. Its hero is ~1490px wide and ours is capped at 1002px by the page
   container, so the reference's veil is 596px ABSOLUTE — 59% of our hero, not
   40%. Taken literally, 40% here is 400px and stops short of the headline: a
   gradient is already at zero as it reaches its last stop, so type ending near
   40% gets no cover at all and "Singapore households" measured 2.2:1 on bare
   photo, under its 3:1 large-text floor. Shrinking the headline does not help
   for the same reason — at 38px it still ends where the veil is spent.
   500px (50%) is the narrowest that leaves the headline covered: .33 alpha at
   its tail, 4.8:1. That is still ~100px LESS veil than the reference carries.
   object-position stays untouched: the photo scales to 688x425 in a 681x425
   box, 7px of horizontal slack and none vertical, so a crop cannot move it. */
.mgk-home__hero-veil { position: absolute; inset: 0; background: linear-gradient(96deg, color-mix(in srgb, var(--mgk-hero-veil) calc(100% * var(--mgk-hero-veil-opacity)), transparent) 0%, color-mix(in srgb, var(--mgk-hero-veil) calc(98% * var(--mgk-hero-veil-opacity)), transparent) calc(var(--mgk-hero-veil-span) * .44), color-mix(in srgb, var(--mgk-hero-veil) calc(72% * var(--mgk-hero-veil-opacity)), transparent) calc(var(--mgk-hero-veil-span) * .74), transparent var(--mgk-hero-veil-span)); }
.mgk-home__hero-copy { position: relative; z-index: 1; width: min(58%, 610px); padding: 46px 42px; }
.mgk-home__hero-copy > span { display: inline-flex; border-radius: 99px; background: var(--mgk-green-tint); color: var(--mgk-green); padding: 6px 10px; font-size: 10.5px; font-weight: 750; }
/* The reference's own clamp (.hero-c h1, clamp(28px,3.2vw,42px)). At 55px the
   headline ran past the 40% veil onto bare photo — 2.6:1, under its 3:1
   large-text floor. 42px ends at 37%, inside the veil. */
.mgk-home__hero h1 { font-family: var(--mgk-font-display); font-size: clamp(28px, 3.2vw, 42px); line-height: 1.05; letter-spacing: -.03em; margin: 15px 0 11px; }
/* max-width from the reference (.hero-c p, 38ch). Unbounded this ran to 51.7%
   and its tail sat on bare photo at 1.0:1; bounded it ends at 34.7%, where the
   veil still carries .76 and the original grey token measures 5.0:1 — so the
   colour stays --mgk-ink-2 as designed rather than being darkened to cope. */
.mgk-home__hero p { color: var(--mgk-ink-2); font-size: 13.5px; line-height: 1.65; margin: 0 0 19px; max-width: 38ch; }
.mgk-home__zone { display: flex; gap: 8px; flex-wrap: wrap; }
.mgk-home__zone input { width: 135px; height: 44px; border: 1.5px solid var(--mgk-line-d); border-radius: var(--mgk-radius-b); background: var(--mgk-paper); color: var(--mgk-ink); padding: 0 12px; outline: 0; }
.mgk-home__zone input:focus { border-color: var(--mgk-green); }
.mgk-home__zone-message { margin-top: 10px; border-radius: var(--mgk-radius-b); background: var(--mgk-green-tint); color: var(--mgk-green-deep); padding: 9px 11px; font-size: 11.5px; }
.mgk-home__zone-message.is-error { background: var(--mgk-red-tint); color: var(--mgk-red); }
.mgk-home__side { display: grid; gap: 18px; }
/* --mgk-banner-veil is the card's ground AND its veil, in one knob: the veil
   has to be the card's own colour or the photograph appears to fade onto a
   foreign tint instead of into the card. Per-variant overrides set it below. */
.mgk-home__banner { --mgk-banner-veil: var(--mgk-warm); --mgk-banner-veil-opacity: 1; --mgk-banner-veil-width: 66%; position: relative; min-height: 191px; border: 1px solid var(--mgk-line); border-radius: var(--mgk-radius); background: var(--mgk-banner-veil); overflow: hidden; }
.mgk-home__banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The prototype's .bnr::after, which v2 never carried over — so until now the
   label sat straight on the photograph: measured against the seeded artwork,
   three of the six lines across these two cards were under the WCAG floor (the
   deals eyebrow at 1.9:1, its link at 2.9:1, the trust link at 4.2:1), and the
   trust card's dark green was hidden under its own image entirely.
   The veil is the card's OWN background colour, so it fades into itself rather
   than onto a foreign tint; each variant restates it below with its colour.
   Stops are set so the photograph reads through the right half rather than
   sitting behind a screen. What makes that safe is where the type falls: both
   small links end by 40% and stay in the thick part of the ramp, and the only
   line crossing into the thin part is the 22px display title, whose floor is
   3:1 not 4.5:1. So .86 to 34%, .55 by 50%, gone at 66%.
   Kept off z-index so it paints under the copy, which is z-index 1. */
.mgk-home__banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(94deg, color-mix(in srgb, var(--mgk-banner-veil) calc(100% * var(--mgk-banner-veil-opacity)), transparent) 0%, color-mix(in srgb, var(--mgk-banner-veil) calc(86% * var(--mgk-banner-veil-opacity)), transparent) calc(var(--mgk-banner-veil-width) * .515), color-mix(in srgb, var(--mgk-banner-veil) calc(55% * var(--mgk-banner-veil-opacity)), transparent) calc(var(--mgk-banner-veil-width) * .758), transparent var(--mgk-banner-veil-width)); }
.mgk-home__banner > span { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: start; width: 70%; padding: 24px 20px; }
/* --mgk-red at 10px measured 3.9:1 over this card — under the 4.5:1 floor for
   text this size, and not something the veil can rescue: even at full cover the
   brand red on warm only reaches ~4.5:1, so the pair is the problem, not the
   wash. Taken 15% toward black it reads 5.1:1 and still reads as the same red.
   Derived from the token rather than hard-coded, so it follows the brand if
   --mgk-red is ever retuned. The trust variant overrides this colour below and
   is unaffected. */
.mgk-home__banner em { color: color-mix(in srgb, var(--mgk-red) 85%, #000); font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mgk-home__banner b { font-family: var(--mgk-font-display); font-size: 22px; line-height: 1.08; margin: 7px 0 12px; }
.mgk-home__banner i { color: var(--mgk-green); font-size: 11.5px; font-style: normal; font-weight: 750; }
/* Not --mgk-green-deep: a dark green veil over a tray of golden cookies reads
   as a sticker laid on the picture. #584020 is that photograph's own hue,
   rgb(176,128,64) sampled across the copy column, taken 50% toward black —
   far enough for the near-white type to clear its floor with margin (8.0:1,
   5.2:1, 6.9:1 measured) while still being a colour the image contains.
   The deals card keeps --mgk-warm: its own photo is warm gold too, and a
   light tint of that hue IS the cream already in use — a mid-brown veil there
   would drop its dark type to 1.4-2.7:1. */
.mgk-home__banner--trust { --mgk-banner-veil: #584020; color: var(--mgk-paper); }

.mgk-home__banner--trust em, .mgk-home__banner--trust i { color: var(--mgk-green-tint); }
/* .tbar: 5 columns, a rule above and below, dividers only BETWEEN cells. */
.mgk-home__trust { display: grid; grid-template-columns: repeat(5, 1fr); margin: 26px 0 42px; border-top: 1px solid var(--mgk-line); border-bottom: 1px solid var(--mgk-line); }
.mgk-home__trust > div { display: flex; align-items: flex-start; gap: 11px; padding: 15px 18px; border-left: 1px solid var(--mgk-line); }
.mgk-home__trust > div:first-child { border-left: 0; padding-left: 0; }
.mgk-home__trust svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 2px; color: var(--mgk-green); }
.mgk-home__trust b, .mgk-home__trust em { display: block; }
.mgk-home__trust em { font-style: normal; }
.mgk-home__trust b { font-size: 13px; letter-spacing: -.012em; margin-bottom: 1px; }
.mgk-home__trust em { color: var(--mgk-ink-3); font-size: 11.5px; overflow-wrap: anywhere; }
.mgk-home__section { margin-top: 48px; }
.mgk-home__section-head, .mgk-home__deals > header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.mgk-home__section-head h2, .mgk-home__deals h2 { font-family: var(--mgk-font-display); font-size: 29px; margin: 0 0 4px; }
.mgk-home__section-head p, .mgk-home__deals p { color: var(--mgk-ink-3); font-size: 12.5px; margin: 0; }
.mgk-home__section-head a, .mgk-home__deals header a { color: var(--mgk-green); font-size: 12px; font-weight: 750; white-space: nowrap; }
.mgk-home__categories { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.mgk-home__categories > a { min-width: 0; text-align: center; }
.mgk-home__categories > a > span { height: 112px; border-radius: var(--mgk-radius); background: var(--mgk-green-tint-2); display: grid; place-items: center; overflow: hidden; font-size: 32px; }
.mgk-home__categories img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--mgk-t2) var(--mgk-ease); }
.mgk-home__categories a:hover img { transform: scale(1.05); }
.mgk-home__categories b { display: block; font-size: 12.5px; line-height: 1.25; margin-top: 8px; }
.mgk-home__categories em { display: block; color: var(--mgk-ink-3); font-size: 10px; font-style: normal; margin-top: 2px; }
.mgk-home__deals { margin-top: 52px; border-radius: var(--mgk-radius); background: var(--mgk-green-deep); padding: 28px; }
.mgk-home__deals header { color: var(--mgk-paper); }
.mgk-home__deals header span { color: var(--mgk-amber-tint); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.mgk-home__deals p { color: var(--mgk-green-tint); }
.mgk-home__deals header a { color: var(--mgk-paper); }
.mgk-home__deals-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mgk-home__deals-actions > a { display: inline-flex; align-items: center; min-height: 38px; border-radius: var(--mgk-radius-s); background: var(--mgk-paper); box-shadow: var(--mgk-highlight); color: var(--mgk-green-deep); padding: 0 16px; font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; transition: transform var(--mgk-t1); }
.mgk-home__deals-actions > a:hover { transform: translateY(-1px); }
.mgk-home__deals-clock { display: flex; align-items: center; gap: 5px; }
.mgk-home__deals-clock span { color: var(--mgk-green-tint); font-size: 11px; font-weight: 700; letter-spacing: .1em; margin-right: 4px; text-transform: uppercase; }
.mgk-home__deals-clock i { display: grid; place-items: center; min-width: 38px; height: 38px; border: 1px solid color-mix(in srgb, var(--mgk-paper) 16%, transparent); border-radius: var(--mgk-radius-s); background: color-mix(in srgb, var(--mgk-paper) 10%, transparent); color: var(--mgk-paper); font-size: 17px; font-style: normal; font-weight: 750; }
.mgk-home__deals-clock s { color: var(--mgk-green-tint); font-weight: 700; text-decoration: none; }
.mgk-home__popular-bar { display: flex; flex-direction: column; align-items: center; gap: 11px; margin-top: 24px; }
.mgk-home__popular-count { color: var(--mgk-ink-3); font-size: 12px; letter-spacing: .01em; }
.mgk-home__popular-more { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 26px; border: 1px solid var(--mgk-line-d); border-radius: 999px; background: var(--mgk-paper); box-shadow: var(--mgk-highlight); color: var(--mgk-ink); font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; transition: border-color var(--mgk-t1), color var(--mgk-t1), transform var(--mgk-t1); }
.mgk-home__popular-more svg { width: 15px; height: 15px; color: var(--mgk-green); transition: transform var(--mgk-t1); }
.mgk-home__popular-more:hover { border-color: var(--mgk-green); color: var(--mgk-green); }
.mgk-home__popular-more:hover svg { transform: translateY(2px); }
.mgk-home__popular-more:disabled { cursor: wait; opacity: .68; }
.mgk-home__empty { border: 1px solid var(--mgk-line); border-radius: var(--mgk-radius); background: var(--mgk-paper); color: var(--mgk-ink-3); padding: 30px; text-align: center; font-size: 12.5px; }
@media (max-width: 1000px) { .mgk-home__hero-layout { grid-template-columns: 1fr; } .mgk-home__side { grid-template-columns: repeat(2, 1fr); } .mgk-home__categories { grid-template-columns: repeat(4, 1fr); } .mgk-home__trust { grid-template-columns: repeat(3, 1fr); row-gap: 22px; } .mgk-home__deals-actions { width: 100%; margin-left: 0; justify-content: space-between; } }
@media (max-width: 640px) { .mgk-home__voucher-strip-in { justify-content: flex-start; } .mgk-home__voucher-ticket { width: 100%; } .mgk-home__voucher-body { flex: 1 1 auto; } .mgk-home__voucher-desc { white-space: normal; } .mgk-home__hero { min-height: 510px; } .mgk-home__hero > img { inset: auto 0 0; width: 100%; height: 48%; } .mgk-home__hero-veil { background: linear-gradient(180deg, color-mix(in srgb, var(--mgk-hero-veil) calc(100% * var(--mgk-hero-veil-opacity)), transparent) 50%, transparent 82%); } .mgk-home__hero-copy { width: 100%; padding: 28px 22px; } .mgk-home__side { grid-template-columns: 1fr; } .mgk-home__trust { grid-template-columns: repeat(2, 1fr); } .mgk-home__trust > div { border: 0; padding: 11px 8px; } .mgk-home__categories { display: flex; overflow-x: auto; padding-bottom: 6px; } .mgk-home__categories > a { flex: 0 0 90px; } .mgk-home__categories > a > span { height: 82px; } .mgk-home__deals { margin-inline: calc(var(--mgk-gutter) * -1); border-radius: 0; padding: 24px var(--mgk-gutter); } }
