/* ==========================================================================
   Marketplace — mobile-first layer ("m2")
   --------------------------------------------------------------------------
   Loaded LAST, after marketplace-ui.css and marketplace-premium.css.

   Everything this file draws uses its own `m2-` class names, so the older
   sheets — which style with `body.mp2 … !important` throughout — never touch
   it. Where it has to restyle an element those sheets also style (the view
   root, the category strip, the store hero), it scopes to `body.mp2.m2` and
   says so.

   Turning the whole layer off is two lines in marketplace.php: this sheet and
   marketplace-m2.js.

   Rules carried over from earlier design decisions, deliberately:
     - primary text is true black (#000), greys stay clearly legible;
     - primary buttons are brand green, never black;
     - sale prices and discount tags are red.
   ========================================================================== */

body.m2 {
    --m2-ink: #000;
    --m2-ink-2: #373d47;
    --m2-ink-3: #5c636e;
    --m2-line: #e6e8eb;
    --m2-line-2: #f0f1f3;
    --m2-canvas: #f2f3f5;
    --m2-surface: #fff;

    --m2-brand: #0e6b50;
    --m2-brand-2: #0a523d;
    --m2-brand-3: #12936c;
    --m2-brand-soft: #e7f4ef;

    --m2-deal: #e1251b;
    --m2-deal-soft: #fff1ef;
    --m2-star: #f5a524;
    --m2-gold: #f59e0b;

    --m2-r: 12px;
    --m2-r-sm: 8px;
    --m2-pad: 12px;
    --m2-bnav-h: 58px;
    --m2-safe-b: env(safe-area-inset-bottom, 0px);
    --m2-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
    --m2-maxw: 1240px;

    background: var(--m2-canvas) !important;
    color: var(--m2-ink);
    -webkit-tap-highlight-color: transparent;
}

body.m2 button { font-family: inherit; }

/* The view root: no card chrome of its own — each page draws its sections. */
body.mp2.m2 #mp-view {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Room for the fixed bottom nav on phones. */
@media (max-width: 899px) {
    body.mp2.m2 { padding-bottom: calc(var(--m2-bnav-h) + var(--m2-safe-b) + 8px) !important; }
    body.mp2.m2.m2-has-cartbar { padding-bottom: calc(var(--m2-bnav-h) + var(--m2-safe-b) + 76px) !important; }
}

body.m2 .m2-wrap { max-width: var(--m2-maxw); margin: 0 auto; }


/* ==========================================================================
   Header
   ========================================================================== */

/* Row 1, phones only: brand and two quiet actions. Scrolls away. */
body.m2 .m2-topline {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 50px;
    padding: 0 8px 0 14px;
    background: var(--m2-surface);
}
body.m2 .m2-topline .m2-brand { margin-right: auto; }

/* Row 2 (+ tabs): sticks. A sibling of the topline, not its child, so it
   keeps sticking after the topline has scrolled off. */
body.m2 .m2-header {
    position: sticky;
    top: 0;
    z-index: 300;
    background: var(--m2-surface);
    box-shadow: 0 1px 0 var(--m2-line);
}
body.m2 .m2-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: var(--m2-maxw);
    margin: 0 auto;
    padding: 6px 12px 8px;
}

body.m2 .m2-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--m2-ink);
    flex: none;
}
body.m2 .m2-brand img { height: 28px; width: auto; max-width: 120px; object-fit: contain; display: block; }
body.m2 .m2-brand .mk-brand-mark {
    width: 30px; height: 30px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--m2-brand); color: #fff;
    font-weight: 800; font-size: 14.5px; line-height: 1;
}
body.m2 .m2-brand .mk-brand-text { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; color: var(--m2-ink); }
body.m2 .m2-header-row > .m2-brand { display: none; }
/* The older sheets size and recolour .mk-brand-mark/.mk-brand-text for their
   own header (and hide the wordmark on phones); the wordmark is the logo here. */
body.mp2.m2 .m2-brand .mk-brand-mark {
    width: 30px !important; height: 30px !important; border-radius: 9px !important;
    display: grid !important; place-items: center !important;
    background: var(--m2-brand) !important; color: #fff !important;
    border: 0 !important; box-shadow: none !important;
    font-size: 14.5px !important; font-weight: 800 !important; line-height: 1 !important;
}
body.mp2.m2 .m2-brand .mk-brand-text {
    display: inline !important; max-width: none !important; overflow: visible !important;
    color: var(--m2-ink) !important; font-size: 17.5px !important; font-weight: 800 !important;
    letter-spacing: -.03em !important;
}

body.m2 .m2-search {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 42px;
    border: 1.5px solid var(--m2-ink);
    border-radius: 999px;
    background: var(--m2-surface);
    padding: 3px 3px 3px 12px;
    margin: 0;
}
body.m2 .m2-search:focus-within { box-shadow: 0 0 0 3px rgba(14, 107, 80, .16); }
body.m2 .m2-search-ico { color: var(--m2-ink-3); font-size: 13.5px; margin-right: 8px; flex: none; }
body.m2 .m2-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 12.5px !important;
    font-weight: 500;
    color: var(--m2-ink);
    -webkit-appearance: none;
    appearance: none;
}
body.m2 .m2-search input::placeholder { color: #7a818c; font-weight: 500; }
body.m2 .m2-search input::-webkit-search-cancel-button { display: none; }
body.m2 .m2-search-clear {
    display: none;
    flex: none;
    width: 28px; height: 28px;
    border: 0; background: transparent;
    color: var(--m2-ink-3);
    border-radius: 50%;
    cursor: pointer;
}
body.m2 .m2-search-clear.visible { display: grid; place-items: center; }
body.m2 .m2-search-go {
    flex: none;
    height: 32px;
    min-width: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--m2-brand);
    color: #fff;
    font-size: 12.5px;
    display: grid;
    place-items: center;
    cursor: pointer;
}
body.m2 .m2-search-go:active { background: var(--m2-brand-2); }

body.m2 .m2-header-actions { display: flex; align-items: center; gap: 2px; flex: none; }
body.m2 .m2-icon-btn {
    position: relative;
    width: 40px; height: 40px;
    border: 0; background: transparent;
    border-radius: 50%;
    display: inline-grid; place-items: center;
    color: var(--m2-ink);
    font-size: 17.5px;
    cursor: pointer;
    flex: none;
}
body.m2 .m2-icon-btn:active { background: var(--m2-line-2); }
body.m2 .m2-icon-btn .m2-lbl { display: none; }
body.m2 .m2-currency {
    width: auto; min-width: 40px; padding: 0 9px;
    border-radius: 999px;
    font-size: 12px; font-weight: 800;
    background: var(--m2-line-2);
    height: 32px;
}
body.m2 .m2-desk-only { display: none !important; }

body.m2 .m2-badge {
    position: absolute;
    top: 2px; right: 0;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--m2-deal);
    color: #fff;
    font-size: 10.5px; font-weight: 800;
    line-height: 18px; text-align: center;
    border: 2px solid var(--m2-surface);
    box-sizing: content-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- Tabs (#mp-top-cats is filled by MP.renderHomeChips) ---------------- */

body.mp2.m2 #mp-top-cats.m2-tabs {
    display: flex !important;
    gap: 20px !important;
    max-width: var(--m2-maxw) !important;
    margin: 0 auto !important;
    padding: 0 14px !important;
    height: 40px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    align-items: stretch !important;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent) !important;
    mask-image: linear-gradient(90deg, #000 88%, transparent) !important;
}
body.mp2.m2 #mp-top-cats.m2-tabs::-webkit-scrollbar { display: none !important; }

body.m2 .m2-tab {
    position: relative;
    flex: none;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--m2-ink-2);
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    box-shadow: none !important;
}
body.m2 .m2-tab.active { color: var(--m2-ink); font-weight: 800; }
body.m2 .m2-tab.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 3px;
    width: 22px; height: 3px;
    margin-left: -11px;
    border-radius: 3px;
    background: var(--m2-brand);
}
body.m2 .m2-tab.deal { color: var(--m2-deal); font-weight: 800; }
body.m2 .m2-tab.deal.active::after { background: var(--m2-deal); }

/* The desktop category dropdown keeps its own styles; just sit it under us. */
body.mp2.m2 #mk-category-dropdown { top: 100% !important; }


/* ==========================================================================
   Bottom navigation
   ========================================================================== */

body.m2 .m2-bnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 400;
    display: flex;
    align-items: stretch;
    height: calc(var(--m2-bnav-h) + var(--m2-safe-b));
    padding-bottom: var(--m2-safe-b);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid var(--m2-line);
}
body.m2 .m2-bnav-item {
    position: relative;
    flex: 1;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--m2-ink-2);
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
body.m2 .m2-bnav-item i { font-size: 18.5px; line-height: 1; }
body.m2 .m2-bnav-item.active { color: var(--m2-ink); font-weight: 800; }
body.m2 .m2-bnav-item.active i { color: var(--m2-brand); }
body.m2 .m2-bnav-item .m2-badge {
    top: 3px; right: auto; left: calc(50% + 4px);
    min-width: 14px; height: 16px; line-height: 16px;
    padding: 0 4px; font-size: 10px;
}

body.m2 .m2-bnav-pill > span.m2-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--m2-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -.01em;
    box-shadow: 0 4px 12px rgba(14, 107, 80, .28);
}
body.m2 .m2-bnav-pill > span.m2-pill i { font-size: 12.5px; color: #fff; }
body.m2 .m2-bnav-pill.active > span.m2-pill { background: var(--m2-brand-2); }
body.m2 .m2-bnav-pill.active i { color: #fff !important; }

@media (min-width: 900px) {
    body.m2 .m2-bnav { display: none; }
}


/* ==========================================================================
   Page scaffolding
   ========================================================================== */

body.m2 .m2-page { max-width: var(--m2-maxw); margin: 0 auto; }

body.m2 .m2-sec {
    background: var(--m2-surface);
    padding: 14px var(--m2-pad);
    margin-bottom: 8px;
}
body.m2 .m2-sec.flush { padding-left: 0; padding-right: 0; }
body.m2 .m2-sec.flush > .m2-sec-head { padding-left: var(--m2-pad); padding-right: var(--m2-pad); }

body.m2 .m2-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
body.m2 .m2-sec-title { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; color: var(--m2-ink); margin: 0; line-height: 1.2; }
body.m2 .m2-sec-sub { font-size: 11px; color: var(--m2-ink-3); margin-top: 2px; }
body.m2 .m2-more {
    flex: none;
    border: 0; background: transparent;
    font-size: 11px; font-weight: 700;
    color: var(--m2-ink-3);
    display: inline-flex; align-items: center; gap: 2px;
    cursor: pointer; padding: 4px 0;
}
body.m2 .m2-more i { font-size: 11px; }
body.m2 .m2-more.deal {
    color: var(--m2-deal);
    background: var(--m2-deal-soft);
    padding: 4px 10px;
    border-radius: 999px;
}

body.m2 .m2-back {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; background: transparent;
    font-size: 12px; font-weight: 700; color: var(--m2-ink);
    padding: 12px var(--m2-pad) 4px;
    cursor: pointer;
}

/* Horizontal scrollers ----------------------------------------------------- */

body.m2 .m2-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 0 var(--m2-pad) 2px;
    margin: 0 calc(-1 * var(--m2-pad));
    overscroll-behavior-x: contain;
}
body.m2 .m2-sec.flush .m2-rail { margin: 0; }
body.m2 .m2-rail::-webkit-scrollbar { display: none; }
body.m2 .m2-rail > * { scroll-snap-align: start; flex: none; }

/* Grids --------------------------------------------------------------------- */

body.m2 .m2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (min-width: 600px) { body.m2 .m2-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 900px) { body.m2 .m2-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { body.m2 .m2-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* On the grey canvas, the product grid sits without a white section behind it. */
body.m2 .m2-feed { padding: 0 8px 8px; }
body.m2 .m2-feed .m2-sec-head { padding: 14px 4px 2px; margin-bottom: 8px; }


/* ==========================================================================
   Product card
   ========================================================================== */

body.m2 .m2-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--m2-surface);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    min-width: 0;
    box-shadow: var(--m2-shadow);
    transition: transform .15s ease;
}
body.m2 .m2-card:active { transform: scale(.985); }
body.m2 .m2-card-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f5f6f7;
    overflow: hidden;
}
body.m2 .m2-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-card-img .m2-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #b8bec6; font-size: 25px; }

body.m2 .m2-tag {
    position: absolute;
    top: 6px; left: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--m2-deal);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 16px;
    letter-spacing: -.01em;
}
body.m2 .m2-tag.pick { background: var(--m2-gold); color: #000; }
body.m2 .m2-tag + .m2-tag { top: 30px; }

body.m2 .m2-wish {
    position: absolute;
    top: 6px; right: 6px;
    width: 30px; height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    display: grid; place-items: center;
    color: var(--m2-ink);
    font-size: 12.5px;
    cursor: pointer;
}
body.m2 .m2-wish.wished { color: var(--m2-deal); }

body.m2 .m2-card-state {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 5px 8px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

body.m2 .m2-card-body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
body.m2 .m2-card-name {
    font-size: 11px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--m2-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
body.m2 .m2-price-row { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; row-gap: 0; }
body.m2 .m2-price { font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; color: var(--m2-ink); line-height: 1.2; }
body.m2 .m2-price.sale { color: var(--m2-deal); }
body.m2 .m2-was { font-size: 11px; color: var(--m2-ink-3); text-decoration: line-through; font-weight: 500; }
body.m2 .m2-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--m2-ink-3);
    white-space: nowrap; overflow: hidden;
}
body.m2 .m2-meta .m2-star { color: var(--m2-star); }
body.m2 .m2-meta b { color: var(--m2-ink-2); font-weight: 700; }
body.m2 .m2-meta .sep { width: 1px; height: 10px; background: var(--m2-line); }
body.m2 .m2-card-store {
    display: flex; align-items: center; gap: 4px;
    font-size: 11px; color: var(--m2-ink-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.m2 .m2-card-store span { overflow: hidden; text-overflow: ellipsis; }
body.m2 .m2-card-store .mk-verified-badge, body.m2 .m2-card-store .bi-patch-check-fill { flex: none; }

body.m2 .m2-add {
    position: absolute;
    right: 8px; bottom: 9px;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 0;
    background: var(--m2-brand-soft);
    color: var(--m2-brand);
    font-size: 12.5px;
    display: grid; place-items: center;
    cursor: pointer;
}
body.m2 .m2-add:active { background: var(--m2-brand); color: #fff; }
body.m2 .m2-add[disabled] { background: var(--m2-line-2); color: #a3a9b1; cursor: not-allowed; }
body.m2 .m2-card-body .m2-meta, body.m2 .m2-card-body .m2-card-store { padding-right: 34px; }

/* Compact variant, in rails */
body.m2 .m2-card.rail { width: 142px; }
body.m2 .m2-card.rail .m2-card-name { font-size: 11px; }
body.m2 .m2-card.rail .m2-price { font-size: 13.5px; }
body.m2 .m2-card.rail .m2-card-body { padding: 7px 8px 9px; }
@media (min-width: 900px) { body.m2 .m2-card.rail { width: 180px; } }


/* ==========================================================================
   Home
   ========================================================================== */

/* Hero — the existing admin carousel, made compact. The ::after rule also
   fixes a long-standing bug: the base sheet gives every slide's ::after a
   180px circle, so the "scrim" drew as a dark disc in the corner. */
body.m2 .m2-hero { background: var(--m2-surface); padding: 10px var(--m2-pad) 12px; margin-bottom: 8px; }
body.mp2.m2 .m2-hero .mk-hero {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 7;
    border-radius: 14px !important;
    overflow: hidden !important;
    margin: 0 !important;
    box-shadow: none !important;
}
body.mp2.m2 .m2-hero .mk-hero-track,
body.mp2.m2 .m2-hero .mk-hero-slide { height: 100% !important; min-height: 0 !important; }
body.mp2.m2 .m2-hero .mk-hero-slide::after,
body.mp2.m2 .m2-hero .mk-hero-slide:not(.mk-hero-slide-color)::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    transform: none !important;
    background: linear-gradient(90deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .18) 60%, transparent 100%) !important;
    pointer-events: none !important;
    opacity: 1 !important;
}
body.mp2.m2 .m2-hero .mk-hero-slide-color::after { display: none !important; }
body.mp2.m2 .m2-hero .mk-hero-content {
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    z-index: 2 !important;
    max-width: 70% !important;
    padding: 14px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 6px !important;
    background: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: 0 !important;
}
body.mp2.m2 .m2-hero .mk-hero-badge {
    align-self: flex-start !important;
    font-size: 10px !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .18) !important;
    border: 0 !important;
    color: #fff !important;
    backdrop-filter: none !important;
}
body.mp2.m2 .m2-hero .mk-hero-title {
    font-size: clamp(16px, 4.6vw, 30px) !important;
    line-height: 1.12 !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
    color: var(--mk-slide-text, #fff) !important;
    margin: 0 !important;
}
body.mp2.m2 .m2-hero .mk-hero-sub {
    font-size: clamp(11px, 3vw, 14px) !important;
    line-height: 1.35 !important;
    color: var(--mk-slide-text, #fff) !important;
    opacity: .92 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
body.mp2.m2 .m2-hero .mk-hero-cta-primary,
body.mp2.m2 .m2-hero .mk-hero-cta-outline {
    padding: 7px 14px !important;
    font-size: 11px !important;
    border-radius: 999px !important;
    min-height: 0 !important;
}
body.mp2.m2 .m2-hero .mk-hero-cta-outline { display: none !important; }
body.mp2.m2 .m2-hero .mk-hero-dots { bottom: 8px !important; right: 12px !important; left: auto !important; }
body.mp2.m2 .m2-hero .mk-hero-arrow, body.mp2.m2 .m2-hero .mk-hero-nav { display: none !important; }

/* Icon quick row --------------------------------------------------------- */

body.m2 .m2-quick {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 12px 6px 10px;
    background: var(--m2-surface);
    margin-bottom: 8px;
}
body.m2 .m2-quick::-webkit-scrollbar { display: none; }
body.m2 .m2-quick-item {
    flex: 1 0 70px;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--m2-ink-2);
    padding: 0;
    text-align: center;
    line-height: 1.2;
}
body.m2 .m2-quick-ico {
    position: relative;
    width: 48px; height: 48px;
    border-radius: 16px;
    display: grid; place-items: center;
    font-size: 18.5px;
    color: #fff;
}
body.m2 .m2-quick-ico .m2-quick-flag {
    position: absolute;
    top: -6px; right: -10px;
    background: var(--m2-deal);
    color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 1px 5px;
    border-radius: 999px;
    border: 2px solid #fff;
}

/* Promo band (the "Super deals" block) ----------------------------------- */

body.m2 .m2-promo {
    position: relative;
    margin-bottom: 8px;
    padding: 16px 0 14px;
    background: linear-gradient(160deg, var(--m2-brand) 0%, var(--m2-brand-3) 100%);
    color: #fff;
    overflow: hidden;
}
body.m2 .m2-promo::before {
    content: "";
    position: absolute;
    right: -60px; top: -80px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
body.m2 .m2-promo-head { position: relative; text-align: center; padding: 0 var(--m2-pad); margin-bottom: 12px; }
body.m2 .m2-promo-kicker { font-size: 11px; font-weight: 700; opacity: .9; letter-spacing: .01em; }
body.m2 .m2-promo-title {
    border: 0; background: transparent; color: #fff; cursor: pointer; padding: 0;
    font-size: 20.5px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
    display: inline-flex; align-items: center; gap: 8px;
}
body.m2 .m2-promo-title i {
    font-size: 12.5px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; color: var(--m2-brand); display: grid; place-items: center;
}
body.m2 .m2-promo .m2-rail { margin: 0; padding: 0 var(--m2-pad); position: relative; }

body.m2 .m2-mini {
    width: 196px;
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    background: var(--m2-surface);
    color: var(--m2-ink);
    cursor: pointer;
    border: 0;
    text-align: left;
}
body.m2 .m2-mini-img { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; background: #f5f6f7; flex: none; }
body.m2 .m2-mini-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-mini-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
body.m2 .m2-mini-store { font-size: 11px; font-weight: 800; color: #6b3a00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.m2 .m2-mini-name { font-size: 11px; color: var(--m2-ink-2); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.m2 .m2-mini-price { font-size: 13.5px; font-weight: 800; color: var(--m2-deal); letter-spacing: -.02em; }

/* Store "brand" cards on home --------------------------------------------- */

body.m2 .m2-brandcard {
    width: 132px;
    border-radius: 12px;
    background: #f1f6ff;
    padding: 9px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    border: 0;
    color: var(--m2-ink);
}
body.m2 .m2-brandcard:nth-child(3n+2) { background: #fff6e9; }
body.m2 .m2-brandcard:nth-child(3n+3) { background: #eefaf4; }
body.m2 .m2-brandcard-name {
    font-size: 12px; font-weight: 800; letter-spacing: -.01em;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: inline-flex; align-items: center; gap: 3px;
}
body.m2 .m2-brandcard-img { position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #fff; }
body.m2 .m2-brandcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-brandcard-img .m2-letter { width: 100%; height: 100%; display: grid; place-items: center; font-size: 35px; font-weight: 800; color: #fff; }
body.m2 .m2-brandcard-pill {
    position: absolute;
    left: 50%; bottom: 7px;
    transform: translateX(-50%);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 11px; font-weight: 800;
    white-space: nowrap;
}

/* Category tiles (home + categories page) --------------------------------- */

body.m2 .m2-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 8px;
}
@media (min-width: 600px) { body.m2 .m2-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1000px) { body.m2 .m2-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
body.m2 .m2-tile {
    border: 0;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--m2-ink);
    min-width: 0;
}
body.m2 .m2-tile-img {
    width: 100%;
    max-width: 84px;
    aspect-ratio: 1;
    border-radius: 16px;
    background: #f4f5f7;
    overflow: hidden;
    display: grid;
    place-items: center;
}
body.m2 .m2-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-tile-img i { font-size: 21.5px; color: var(--m2-brand); }
body.m2 .m2-tile-name {
    font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center;
    color: var(--m2-ink-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    max-width: 100%;
}
body.m2 .m2-tile.more .m2-tile-img { background: var(--m2-line-2); }
body.m2 .m2-tile.more .m2-tile-img i { color: var(--m2-ink-2); font-size: 18.5px; }

/* Load-more sentinel + skeletons ------------------------------------------ */

body.m2 .m2-sentinel { height: 1px; }
body.m2 .m2-loading { padding: 18px; text-align: center; color: var(--m2-ink-3); font-size: 11px; }
body.m2 .m2-skel { background: linear-gradient(90deg, #eceef1 25%, #f6f7f8 37%, #eceef1 63%); background-size: 400% 100%; animation: m2-shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes m2-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { body.m2 .m2-skel { animation: none; } }

body.m2 .m2-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--m2-ink-3);
    font-size: 12px;
}
body.m2 .m2-empty i { display: block; font-size: 28px; color: #b3b9c1; margin-bottom: 8px; }
body.m2 .m2-empty b { display: block; color: var(--m2-ink); font-size: 13.5px; margin-bottom: 4px; }


/* ==========================================================================
   Categories page — left rail + tile grid
   ========================================================================== */

body.m2 .m2-cat {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: calc(100vh - 96px);
    background: var(--m2-surface);
}
@media (min-width: 900px) { body.m2 .m2-cat { grid-template-columns: 200px minmax(0, 1fr); border-radius: 0 0 12px 12px; } }

body.m2 .m2-cat-rail {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 96px - var(--m2-bnav-h) - var(--m2-safe-b));
    overflow-y: auto;
    background: var(--m2-canvas);
    scrollbar-width: none;
}
body.m2 .m2-cat-rail::-webkit-scrollbar { display: none; }
body.m2 .m2-cat-rail button {
    position: relative;
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 14px 10px 14px 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--m2-ink-2);
    cursor: pointer;
}
body.m2 .m2-cat-rail button.active {
    background: var(--m2-surface);
    color: var(--m2-brand);
    font-weight: 800;
}
body.m2 .m2-cat-rail button.active::before {
    content: "";
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--m2-brand);
}
body.m2 .m2-cat-rail button.deal { color: var(--m2-deal); }

body.m2 .m2-cat-pane { padding: 10px 10px 18px; min-width: 0; }
body.m2 .m2-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
body.m2 .m2-chips::-webkit-scrollbar { display: none; }
body.m2 .m2-chip {
    flex: none;
    border: 1.5px solid transparent;
    background: var(--m2-line-2);
    color: var(--m2-ink);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex; align-items: center; gap: 5px;
    cursor: pointer;
    white-space: nowrap;
}
body.m2 .m2-chip.active { border-color: var(--m2-brand); color: var(--m2-brand); background: var(--m2-surface); }
body.m2 .m2-chip.deal i { color: var(--m2-deal); }

body.m2 .m2-cat-pane .m2-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
@media (min-width: 600px) { body.m2 .m2-cat-pane .m2-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { body.m2 .m2-cat-pane .m2-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
body.m2 .m2-cat-pane .m2-tile-img { max-width: 92px; }

body.m2 .m2-tile .m2-tile-price { font-size: 11px; font-weight: 800; color: var(--m2-ink); margin-top: -2px; }
body.m2 .m2-tile .m2-tile-price.sale { color: var(--m2-deal); }
body.m2 .m2-tile.first .m2-tile-img { background: var(--m2-deal-soft); }

body.m2 .m2-cat-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--m2-brand-soft);
    margin-bottom: 14px;
}
body.m2 .m2-cat-banner b { font-size: 13.5px; font-weight: 800; display: block; }
body.m2 .m2-cat-banner small { font-size: 11px; color: var(--m2-ink-3); }
body.m2 .m2-btn {
    border: 0;
    border-radius: 999px;
    background: var(--m2-brand);
    color: #fff;
    padding: 9px 16px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}
body.m2 .m2-btn:active { background: var(--m2-brand-2); }
body.m2 .m2-btn.ghost { background: var(--m2-surface); color: var(--m2-brand); box-shadow: inset 0 0 0 1.5px var(--m2-brand); }
body.m2 .m2-btn.block { width: 100%; justify-content: center; padding: 12px 16px; font-size: 12.5px; }


/* ==========================================================================
   Stores directory
   ========================================================================== */

body.m2 .m2-stores-top {
    position: sticky;
    top: 96px;
    z-index: 20;
    background: var(--m2-surface);
    padding: 10px var(--m2-pad) 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 0 var(--m2-line);
}
body.m2 .m2-stores-top h1 { font-size: 17.5px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 2px; }
body.m2 .m2-stores-top p { font-size: 11px; color: var(--m2-ink-3); margin: 0 0 10px; }
body.m2 .m2-filter {
    display: flex; align-items: center; gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--m2-line-2);
    margin-bottom: 10px;
}
body.m2 .m2-filter i { color: var(--m2-ink-3); }
body.m2 .m2-filter input {
    flex: 1; min-width: 0; height: 100%;
    border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important;
    font-size: 12.5px !important; padding: 0 !important; color: var(--m2-ink);
}
body.m2 .m2-stores-top .m2-chips { margin-bottom: 0; }

body.m2 .m2-store-list { display: grid; gap: 8px; }
@media (min-width: 760px) { body.m2 .m2-store-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 var(--m2-pad); } }
@media (min-width: 1180px) { body.m2 .m2-store-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

body.m2 .m2-store {
    background: var(--m2-surface);
    padding: 12px;
    cursor: pointer;
}
@media (min-width: 760px) { body.m2 .m2-store { border-radius: 12px; box-shadow: var(--m2-shadow); } }
body.m2 .m2-store-row { display: flex; align-items: center; gap: 11px; }
body.m2 .m2-store-logo {
    width: 52px; height: 52px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--m2-brand);
    flex: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
body.m2 .m2-store-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-store-logo .m2-letter { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18.5px; }
body.m2 .m2-store-info { flex: 1; min-width: 0; }
body.m2 .m2-store-name {
    font-size: 13px; font-weight: 800; letter-spacing: -.01em; color: var(--m2-ink);
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap; overflow: hidden;
}
body.m2 .m2-store-name span { overflow: hidden; text-overflow: ellipsis; }
body.m2 .m2-store-meta {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    font-size: 11px; color: var(--m2-ink-3); margin-top: 3px;
}
body.m2 .m2-store-meta b { color: var(--m2-ink-2); font-weight: 700; }
body.m2 .m2-store-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #b3b9c1; }
body.m2 .m2-store-meta .ok { color: var(--m2-brand); font-weight: 700; }
body.m2 .m2-store-meta .paused { color: #b45309; font-weight: 700; }
body.m2 .m2-store-desc {
    font-size: 11px; color: var(--m2-ink-2); margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.m2 .m2-visit {
    flex: none;
    border: 1.5px solid var(--m2-ink);
    background: var(--m2-surface);
    color: var(--m2-ink);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
body.m2 .m2-store-shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 11px;
}
body.m2 .m2-shelf-item { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f5f6f7; }
body.m2 .m2-shelf-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-shelf-item .m2-brandcard-pill { font-size: 11px; padding: 2px 8px; bottom: 6px; }
body.m2 .m2-shelf-item.more {
    display: grid; place-items: center; text-align: center;
    background: var(--m2-line-2); color: var(--m2-ink-2);
    font-size: 11px; font-weight: 700; line-height: 1.3;
}
body.m2 .m2-shelf-item.more b { display: block; font-size: 14.5px; color: var(--m2-ink); }


/* Any legacy product grid (deals, search, category, related) gets the same
   dense two-up rhythm on phones once it is filled with the new card. */
body.mp2.m2 .mk-product-grid:has(> .m2-card) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
}
@media (min-width: 600px) { body.mp2.m2 .mk-product-grid:has(> .m2-card) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; } }
@media (min-width: 900px) { body.mp2.m2 .mk-product-grid:has(> .m2-card) { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (min-width: 1180px) { body.mp2.m2 .mk-product-grid:has(> .m2-card) { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } }
body.mp2.m2 .mk-product-rail:has(> .m2-card) > .m2-card { width: 150px; flex: none; }


/* ==========================================================================
   Store page
   ========================================================================== */

body.m2 .m2-shead { background: var(--m2-surface); margin-bottom: 8px; }
body.m2 .m2-shead-banner {
    position: relative;
    height: 104px;
    overflow: hidden;
}
body.m2 .m2-shead-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-shead-share {
    position: absolute;
    top: 10px; right: 10px;
    width: 36px; height: 36px;
    border: 0; border-radius: 50%;
    background: rgba(0, 0, 0, .38);
    color: #fff;
    font-size: 13.5px;
    display: grid; place-items: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
}
body.m2 .m2-shead-body { padding: 0 var(--m2-pad) 14px; }
body.m2 .m2-shead-row { display: flex; align-items: flex-end; gap: 12px; margin-top: -26px; position: relative; }
body.m2 .m2-shead-logo {
    width: 72px; height: 72px;
    border-radius: 18px;
    border: 3px solid var(--m2-surface);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    overflow: hidden;
    flex: none;
}
body.m2 .m2-shead-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-shead-logo .m2-letter { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 25px; }
body.m2 .m2-shead-id { min-width: 0; padding-bottom: 2px; }
body.m2 .m2-shead-id h1 {
    margin: 0;
    font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
    display: flex; align-items: center; gap: 5px;
}
body.m2 .m2-star-line i { color: var(--m2-star); }
body.m2 .m2-shead-desc {
    margin: 10px 0 0;
    font-size: 11.5px; line-height: 1.45; color: var(--m2-ink-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.m2 .m2-shead-addr { margin-top: 6px; font-size: 11px; color: var(--m2-ink-3); display: flex; gap: 5px; align-items: center; }

body.m2 .m2-vacation {
    display: flex; gap: 10px; align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff7e6;
    color: #7a4b00;
    font-size: 11px;
}
body.m2 .m2-vacation i { font-size: 14.5px; }
body.m2 .m2-vacation b { display: block; color: #000; }

body.m2 .m2-coupons { margin-top: 12px; padding-bottom: 2px; }
body.m2 .m2-coupon {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
    min-width: 150px;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: var(--m2-deal-soft);
    color: var(--m2-deal);
    text-align: left;
    cursor: pointer;
}
body.m2 .m2-coupon b { font-size: 13.5px; font-weight: 800; }
body.m2 .m2-coupon small { font-size: 11px; color: var(--m2-ink-2); }
body.m2 .m2-coupon span {
    margin-top: 5px;
    font-size: 11px; font-weight: 800; letter-spacing: .04em;
    padding: 2px 8px;
    border: 1px dashed var(--m2-deal);
    border-radius: 6px;
}

body.m2 .m2-store-cats { padding: 12px 4px 2px; margin-bottom: 8px; }

body.m2 .m2-policy { border-top: 1px solid var(--m2-line-2); }
body.m2 .m2-policy:first-of-type { border-top: 0; }
body.m2 .m2-policy summary {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 0;
    font-size: 12px; font-weight: 700;
    cursor: pointer;
    list-style: none;
}
body.m2 .m2-policy summary::-webkit-details-marker { display: none; }
body.m2 .m2-policy summary .bi-chevron-down { margin-left: auto; font-size: 11px; color: var(--m2-ink-3); transition: transform .2s; }
body.m2 .m2-policy[open] summary .bi-chevron-down { transform: rotate(180deg); }
body.m2 .m2-policy > div { padding: 0 0 13px 28px; font-size: 11px; line-height: 1.5; color: var(--m2-ink-2); }

@media (min-width: 900px) {
    body.m2 .m2-shead { border-radius: 14px; overflow: hidden; }
    body.m2 .m2-shead-banner { height: 180px; }
    body.m2 .m2-shead-row { margin-top: -34px; }
    body.m2 .m2-shead-logo { width: 92px; height: 92px; border-radius: 22px; }
    body.m2 .m2-shead-id h1 { font-size: 21.5px; }
}


/* ==========================================================================
   Cart
   ========================================================================== */

body.m2 .m2-cart-layout { display: block; }
@media (min-width: 900px) {
    body.m2 .m2-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; padding: 0 var(--m2-pad); }
}

body.m2 .m2-cgroup { background: var(--m2-surface); margin-bottom: 8px; padding: 4px 0 0; }
@media (min-width: 900px) { body.m2 .m2-cgroup { border-radius: 12px; overflow: hidden; } }
body.m2 .m2-cgroup-head {
    display: flex; align-items: center; gap: 7px;
    padding: 10px var(--m2-pad) 8px;
    font-size: 12.5px; font-weight: 800; color: var(--m2-ink);
    border: 0; background: transparent; width: 100%; text-align: left; cursor: pointer;
}
body.m2 .m2-cgroup-head .bi-shop { font-size: 14.5px; }
body.m2 .m2-cgroup-head .bi-chevron-right { font-size: 11px; color: var(--m2-ink-3); margin-left: 2px; }
body.m2 .m2-cgroup-head .count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--m2-ink-3); }

body.m2 .m2-citem {
    position: relative;
    display: flex;
    gap: 11px;
    padding: 10px var(--m2-pad) 14px;
    border-top: 1px solid var(--m2-line-2);
}
body.m2 .m2-citem-img {
    width: 92px; height: 92px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f6f7;
    flex: none;
    cursor: pointer;
}
body.m2 .m2-citem-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m2 .m2-citem-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
body.m2 .m2-citem-name {
    font-size: 11.5px; line-height: 1.35; color: var(--m2-ink); padding-right: 26px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    cursor: pointer;
}
body.m2 .m2-citem-var {
    align-self: flex-start;
    font-size: 11px; color: var(--m2-ink-2);
    background: var(--m2-line-2);
    padding: 2px 8px; border-radius: 6px;
}
body.m2 .m2-citem-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
body.m2 .m2-citem-price { font-size: 14.5px; font-weight: 800; letter-spacing: -.02em; }
body.m2 .m2-citem-each { font-size: 11px; color: var(--m2-ink-3); }
body.m2 .m2-citem-low { font-size: 11px; font-weight: 700; color: var(--m2-deal); }
body.m2 .m2-citem-del {
    position: absolute;
    top: 8px; right: 6px;
    width: 32px; height: 32px;
    border: 0; background: transparent;
    color: var(--m2-ink-3);
    font-size: 13.5px;
    border-radius: 50%;
    cursor: pointer;
}
body.m2 .m2-citem-del:active { background: var(--m2-line-2); color: var(--m2-deal); }

body.m2 .m2-stepper {
    display: inline-flex;
    align-items: center;
    height: 30px;
    border: 1px solid var(--m2-line);
    border-radius: 999px;
    overflow: hidden;
    flex: none;
}
body.m2 .m2-stepper button {
    width: 32px; height: 100%;
    border: 0; background: transparent;
    font-size: 14.5px; font-weight: 600;
    color: var(--m2-ink);
    cursor: pointer;
    display: grid; place-items: center;
}
body.m2 .m2-stepper button:active { background: var(--m2-line-2); }
body.m2 .m2-stepper input {
    width: 34px; height: 100%;
    border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
    text-align: center;
    font-size: 12px !important; font-weight: 700; padding: 0 !important;
    color: var(--m2-ink);
    -moz-appearance: textfield;
}

/* Summary: a card on desktop, a sticky bar on phones */
body.m2 .m2-summary { display: none; }
@media (min-width: 900px) {
    body.m2 .m2-summary {
        display: block;
        position: sticky;
        top: 112px;
        background: var(--m2-surface);
        border-radius: 12px;
        padding: 16px;
        box-shadow: var(--m2-shadow);
    }
}
body.m2 .m2-summary h2 { font-size: 14.5px; font-weight: 800; margin: 0 0 12px; }
body.m2 .m2-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--m2-ink-2); padding: 5px 0; }
body.m2 .m2-kv b { color: var(--m2-ink); font-weight: 700; }
body.m2 .m2-kv.total { border-top: 1px solid var(--m2-line); margin-top: 6px; padding-top: 12px; font-size: 13.5px; color: var(--m2-ink); font-weight: 800; }
body.m2 .m2-kv.total b { font-size: 16.5px; font-weight: 800; }
body.m2 .m2-summary .m2-btn { margin-top: 14px; }
body.m2 .m2-summary-note { font-size: 11px; color: var(--m2-ink-3); margin-top: 10px; display: flex; gap: 6px; }

body.m2 .m2-cartbar {
    position: fixed;
    left: 0; right: 0;
    bottom: calc(var(--m2-bnav-h) + var(--m2-safe-b));
    z-index: 390;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px var(--m2-pad);
    background: var(--m2-surface);
    border-top: 1px solid var(--m2-line);
    box-shadow: 0 -6px 16px rgba(16, 24, 40, .06);
}
@media (min-width: 900px) { body.m2 .m2-cartbar { display: none; } }
body.m2 .m2-cartbar-sum { flex: 1; min-width: 0; line-height: 1.2; }
body.m2 .m2-cartbar-sum b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; }
body.m2 .m2-cartbar-sum small { font-size: 11px; color: var(--m2-ink-3); }
body.m2 .m2-cartbar .m2-btn { padding: 12px 20px; font-size: 12.5px; box-shadow: 0 4px 12px rgba(14, 107, 80, .25); }


/* ==========================================================================
   Account
   ========================================================================== */

body.m2 .m2-acct-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px var(--m2-pad);
    background: var(--m2-surface);
    margin-bottom: 8px;
}
body.m2 .m2-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--m2-brand);
    color: #fff;
    display: grid; place-items: center;
    font-size: 16.5px; font-weight: 800;
    flex: none;
}
body.m2 .m2-acct-id { flex: 1; min-width: 0; }
body.m2 .m2-acct-id b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.m2 .m2-acct-id small { font-size: 11px; color: var(--m2-ink-3); }

body.m2 .m2-orders-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}
body.m2 .m2-orders-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.m2 .m2-ostate {
    position: relative;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--m2-ink-2);
    cursor: pointer;
    border-radius: 10px;
    text-align: center;
    line-height: 1.2;
}
body.m2 .m2-ostate i { font-size: 20px; color: var(--m2-ink); line-height: 1; }
body.m2 .m2-ostate.active { color: var(--m2-brand); font-weight: 800; }
body.m2 .m2-ostate.active i { color: var(--m2-brand); }
body.m2 .m2-ostate .m2-badge { top: -2px; right: calc(50% - 24px); }

body.m2 .m2-acct-tab { background: var(--m2-surface); padding: 12px var(--m2-pad) 16px; margin-bottom: 8px; min-height: 180px; }
body.m2 .m2-acct-tab-title { font-size: 14.5px; font-weight: 800; margin: 2px 0 10px; }
body.m2 .m2-signout {
    display: block;
    width: calc(100% - 2 * var(--m2-pad));
    margin: 4px auto 16px;
    border: 0;
    background: var(--m2-surface);
    color: var(--m2-deal);
    font-size: 12.5px;
    font-weight: 700;
    padding: 13px;
    border-radius: 12px;
    cursor: pointer;
}
/* The account tab contents were built for the old two-column layout. */
body.mp2.m2 .m2-acct-tab .mk-account-tabs { display: none !important; }


/* ==========================================================================
   Global footer: kept, quieter on phones
   ========================================================================== */

@media (max-width: 899px) {
    body.mp2.m2 .mk-global-footer { margin-top: 8px !important; border-radius: 0 !important; }
    body.mp2.m2 .mk-global-footer-brand p,
    body.mp2.m2 .mk-global-footer-badges { display: none !important; }
    body.mp2.m2 .mk-global-footer-inner { padding-top: 18px !important; padding-bottom: 8px !important; }
}
/* The home page's own mini footer duplicates the global one. */
body.mp2.m2 .mk-market-footer { display: none !important; }


/* ==========================================================================
   Desktop
   ========================================================================== */

@media (min-width: 900px) {
    body.m2 .m2-topline { display: none; }
    body.m2 .m2-header-row { padding: 12px 20px 10px; gap: 18px; }
    body.m2 .m2-header-row > .m2-brand { display: inline-flex; }
    body.m2 .m2-search { height: 46px; max-width: 760px; }
    body.m2 .m2-desk-only { display: inline-grid !important; }
    body.m2 .m2-icon-btn.m2-desk-only { width: auto; padding: 0 10px; border-radius: 10px; gap: 6px; grid-auto-flow: column; font-size: 16.5px; }
    body.m2 .m2-icon-btn.m2-desk-only .m2-lbl { display: inline; font-size: 11px; font-weight: 700; }
    body.m2 .m2-icon-btn .m2-badge { top: 0; right: -2px; }
    /* With a label beside the icon, pin the badge to the icon, not the button's edge. */
    body.m2 .m2-icon-btn.m2-desk-only .m2-badge { top: 1px; left: 20px; right: auto; }
    body.m2 .m2-cart-layout, body.m2 .m2-store-list { padding: 0; }
    body.mp2.m2 #mp-top-cats.m2-tabs { padding: 0 20px !important; height: 42px !important; -webkit-mask-image: none !important; mask-image: none !important; }

    body.m2 .m2-page { padding: 12px 20px 24px; }
    body.m2 .m2-page > .m2-sec, body.m2 .m2-page > .m2-promo, body.m2 .m2-page > .m2-quick, body.m2 .m2-page > .m2-hero { border-radius: 14px; }
    body.m2 .m2-hero { padding: 0; background: transparent; }
    body.mp2.m2 .m2-hero .mk-hero { aspect-ratio: 18 / 5; }
    body.m2 .m2-feed { padding: 0; }
    body.m2 .m2-mini { width: 240px; }
    body.m2 .m2-brandcard { width: 160px; }

    body.m2 .m2-cat { min-height: 70vh; }
    body.m2 .m2-cat-rail, body.m2 .m2-stores-top { top: 106px; }
    body.m2 .m2-stores-top { border-radius: 14px; }
    body.m2 .m2-acct-head, body.m2 .m2-acct-tab, body.m2 .m2-sec { border-radius: 14px; }
}
