/* ============================================================
   KikiSend — Cart & Checkout UI · v9 "Fresh Market"
   Sticky cart bar · cart drawer · store page · checkout
   Flat colour only. Uses the modern.css v9 tokens.
   ============================================================ */

/* ---------- Sticky cart bar ---------- */
.kscart-bar {
  position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 26px); transform: translateX(-50%);
  z-index: 950; width: calc(100% - 24px); max-width: 580px;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px;
  background: var(--panel-deep); color: #fff; border: 1px solid var(--green-700);
  border-radius: var(--r-pill); box-shadow: var(--shadow-xl);
  animation: kscart-in .3s var(--ease-spring, ease);
  transition: transform .35s ease, opacity .25s ease;
}
@keyframes kscart-in { from { transform: translateX(-50%) translateY(120%); } to { transform: translateX(-50%) translateY(0); } }
.kscart-bar.ks-parked { transform: translateX(-50%) translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }
.kscart-bar[hidden] { display: none !important; }
.kscart-bar__main { flex: 1; display: flex; align-items: center; gap: 12px; background: none; border: 0; color: inherit; text-align: left; padding: 0; min-width: 0; cursor: pointer; }
.kscart-bar__thumb { position: relative; width: 48px; height: 48px; border-radius: var(--r-md); background: var(--panel-deep-2) center/cover no-repeat; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.kscart-bar__bubble { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--green-950); font-size: .74rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--panel-deep); }
.kscart-bar__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.kscart-bar__count { font-size: .82rem; color: rgba(255,255,255,.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kscart-bar__count b { color: #fff; font-weight: 800; }
.kscart-bar__total { font-family: var(--f-disp); font-size: 1.1rem; font-weight: 800; color: var(--lemon-300); letter-spacing: -.02em; }
.kscart-bar__cta { flex-shrink: 0; background: var(--brand); color: var(--green-950); font-weight: 800; font-size: .95rem; padding: 14px 24px; border-radius: var(--r-pill); text-decoration: none; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.kscart-bar__cta:hover { background: var(--lemon-400); } .kscart-bar__cta:active { transform: scale(.96); }
.kscart-bar__park { flex-shrink: 0; align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 14px; border-radius: var(--r-pill); background: transparent; color: var(--lemon-300); border: 1px solid var(--green-600); font-size: .76rem; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background var(--t-fast) var(--ease); }
.kscart-bar__park:hover { background: rgba(31,178,0,.16); } .kscart-bar__park:active { transform: scale(.95); }
.kscart-mini { position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 26px); transform: translateX(-50%); z-index: 950; display: inline-flex; align-items: center; gap: 8px; background: var(--panel-deep); color: #fff; border: 1px solid var(--green-600); border-radius: var(--r-pill); padding: 12px 20px; font-size: .84rem; font-weight: 800; white-space: nowrap; box-shadow: var(--shadow-xl); cursor: pointer; }
.kscart-mini[hidden] { display: none; }
.kscart-mini b { color: var(--lemon-300); } .kscart-mini .ks-up { color: var(--lemon-400); animation: kscart-bob 1.8s ease-in-out infinite; }
@keyframes kscart-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
body.ks-has-cartbar .page-wrapper { padding-bottom: calc(var(--bottom-h) + 132px); }
@media (min-width: 901px) { .kscart-bar, .kscart-mini { bottom: calc(var(--bottom-h) + 34px); } }
@media (prefers-reduced-motion: reduce) { .kscart-bar, .kscart-mini { transition: none; } .kscart-mini .ks-up { animation: none; } }

/* ---------- Cart drawer (bottom sheet) ---------- */
html.kscart-locked, html.kscart-locked body { overflow: hidden; }
.kscart-drawer { position: fixed; inset: 0; z-index: 1200; }
.kscart-drawer__scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); }
/* One-store-per-order confirmation (built by cart.js). */
.kscart-conflict { position: fixed; inset: 0; z-index: 1400; }
.kscart-conflict[hidden] { display: none !important; }
.kscart-conflict__scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); }
.kscart-conflict__sheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; background: var(--surface); border-radius: var(--r-3xl) var(--r-3xl) 0 0; box-shadow: var(--shadow-xl); padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); animation: kscart-up .3s var(--ease-spring, ease); }
.kscart-conflict__handle { width: 44px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 4px auto 14px; }
.kscart-conflict__sheet h3 { margin: 0 0 8px; font-size: 1.2rem; }
.kscart-conflict__sheet p { margin: 0 0 18px; font-size: .92rem; line-height: 1.5; color: var(--text-muted); }
.kscart-conflict__actions { display: flex; flex-direction: column; gap: 10px; }
.kscart-rule { font-size: .78rem; color: var(--text-muted); background: var(--brand-light, var(--surface-2)); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.4; }
.kscart-conflict__actions .btn { width: 100%; min-height: 50px; }
.prod-stepper button:disabled { opacity: .45; cursor: not-allowed; }
.kscart-stepper button:disabled { opacity: .45; cursor: not-allowed; }
[data-add-to-cart][disabled] { opacity: .45; filter: grayscale(1); cursor: not-allowed; }
@media (min-width: 560px) { .kscart-conflict__actions { flex-direction: row-reverse; } }
.kscart-drawer__sheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-3xl) var(--r-3xl) 0 0; box-shadow: var(--shadow-xl); animation: kscart-up .32s var(--ease-spring, ease); }
@keyframes kscart-up { from { transform: translateX(-50%) translateY(40px); opacity: .4; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.kscart-drawer__handle { width: 44px; height: 5px; border-radius: 999px; background: var(--line-strong); margin: 12px auto 4px; }
.kscart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 22px 14px; border-bottom: 1px solid var(--line-soft); }
.kscart-drawer__head h3 { font-size: 1.25rem; }
.kscart-drawer__x { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); color: var(--text-strong); display: inline-flex; align-items: center; justify-content: center; transition: background var(--t-fast) var(--ease); }
.kscart-drawer__x:hover { background: var(--surface-3); }
.kscart-drawer__body { padding: 8px 22px; overflow-y: auto; }
.kscart-drawer__empty { text-align: center; padding: 44px 0; color: var(--text-muted); }
.kscart-group { padding: 12px 0; }
.kscart-group__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kscart-note { display: block; margin: 2px 0 12px; }
.kscart-note span { display: block; font-size: .74rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.kscart-note textarea { width: 100%; min-height: 52px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, var(--surface)); color: var(--text); padding: 8px 10px; font: inherit; font-size: .86rem; line-height: 1.35; }
.kscart-note textarea:focus { outline: none; border-color: var(--brand); }
.kscart-bar__cta.is-under-min, #kscartDrawerCta.is-under-min { background: var(--surface-2, var(--surface)); color: var(--text-muted); border: 1px solid var(--line); cursor: not-allowed; }
.kscart-group__name { font-weight: 800; color: var(--text-strong); font-size: .98rem; }
.kscart-group__clear { background: none; color: var(--danger); font-size: .8rem; font-weight: 700; }
.kscart-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.kscart-line__info { flex: 1; min-width: 0; }
.kscart-line__name { font-weight: 700; font-size: .93rem; color: var(--text-strong); }
.kscart-line__price { font-size: .8rem; color: var(--text-muted); }
.kscart-line__total { font-weight: 800; min-width: 76px; text-align: right; font-family: var(--f-num); }
.kscart-stepper { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px; }
.kscart-stepper button { width: 36px; height: 36px; border-radius: 50%; font-size: 1.05rem; font-weight: 800; color: var(--text-strong); display: inline-flex; align-items: center; justify-content: center; transition: transform .12s var(--ease); }
.kscart-stepper button:last-child { background: var(--btn-bg); color: var(--btn-fg); }
.kscart-stepper button.is-pressed { transform: scale(.85); }
.kscart-stepper span { min-width: 28px; text-align: center; font-weight: 800; }
.kscart-stepper [data-qty].qty-bump, .kscart-stepper span.qty-bump { animation: mkco-bump .25s ease; }
.kscart-drawer__foot { padding: 16px 22px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.kscart-drawer__ftotal { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.kscart-drawer__ftotal span { color: var(--text-muted); font-size: .92rem; }
.kscart-drawer__ftotal b { font-family: var(--f-disp); font-size: 1.35rem; letter-spacing: -.02em; }
.kscart-drawer__foot .btn { width: 100%; }
.kscart-fly { position: fixed; z-index: 1300; background: var(--brand); color: var(--green-950); font-size: .8rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; pointer-events: none; animation: kscart-fly .7s ease forwards; }
@keyframes kscart-fly { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-44px); opacity: 0; } }

/* Cart badge on the bottom nav */
.mob-nav-ic { position: relative; display: inline-flex; -webkit-line-clamp: unset !important; }
.mob-nav-badge { position: absolute; top: -8px; right: -13px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--green-950); font-size: .66rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface); -webkit-line-clamp: unset !important; }
.mob-nav-badge[hidden] { display: none; }
[data-add-to-cart].is-added { background: var(--green-900) !important; color: var(--lemon-300) !important; }

/* ============================================================
   STORE PAGE
   ============================================================ */
.store-shell { margin: 0 0 18px; }
.store-hero { position: relative; width: 100%; aspect-ratio: 16 / 8; max-height: 300px; border-radius: var(--r-2xl); overflow: hidden; background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 4rem; }
[data-theme="dark"] .store-hero { background: var(--surface-2); }
.store-hero img { width: 100%; height: 100%; object-fit: cover; }
.store-hero__back, .store-hero__basket { position: absolute; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--text-strong); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); font-size: 1rem; transition: transform var(--t-fast) var(--ease); }
.store-hero__back:active, .store-hero__basket:active { transform: scale(.92); }
.store-hero__back { left: 14px; } .store-hero__basket { right: 14px; background: var(--brand); color: var(--green-950); font-size: 1.15rem; }
.store-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 18px 0 14px; }
.store-title-row h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.1; }
.store-rating { flex-shrink: 0; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--r-md); padding: 8px 14px; text-align: center; font-weight: 800; color: var(--link); font-size: .95rem; }
.store-rating small { display: block; font-size: .7rem; font-weight: 700; color: var(--text-muted); }
.store-info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px 18px; margin-bottom: 16px; }
.store-info-card__row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .92rem; color: var(--text); } .store-info-card__row b { color: var(--text-strong); } .store-info-card__row .ico { width: 20px; text-align: center; }
.store-info-card__sep { height: 1px; background: var(--line-soft); margin: 10px 0; }
.store-info-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.store-info-card__min { color: var(--text-muted); font-size: .88rem; } .store-info-card__min b { color: var(--text-strong); }
.store-cats { display: flex; gap: 22px; overflow-x: auto; padding: 4px 2px 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.store-cats::-webkit-scrollbar { display: none; }
.store-cat { position: relative; flex: 0 0 auto; padding: 10px 2px 13px; font-size: 1rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.store-cat.active { color: var(--text-strong); }
.store-cat.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; border-radius: 4px 4px 0 0; background: var(--brand); }
.store-cat__count { display: inline-block; margin-left: 6px; background: var(--brand-soft); color: var(--link); font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.store-cats__search { margin-left: auto; flex: 0 0 auto; color: var(--text-muted); font-size: 1rem; padding: 8px; }
.store-group { margin-bottom: 28px; } .store-group[hidden] { display: none; }
.store-group__title { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin-bottom: 14px; }
.store-group__title .pill { background: var(--brand-soft); color: var(--link); font-size: .76rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.store-group__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.prod-card { display: flex; flex-direction: column; min-width: 0; }
.prod-card__media { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: var(--r-xl); overflow: hidden; background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 2.6rem; margin-bottom: 10px; }
[data-theme="dark"] .prod-card__media { background: var(--surface-2); }
.prod-card__media img { width: 100%; height: 100%; object-fit: cover; }
.prod-card__price { position: absolute; left: 10px; bottom: 10px; background: var(--panel-deep); color: var(--lemon-300); font-family: var(--f-disp); font-size: .88rem; font-weight: 800; padding: 6px 12px; border-radius: 999px; }
.prod-card__soldout { position: absolute; left: 10px; top: 10px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
/* Sold out means un-buyable: the photo is visibly muted and nothing invites
   a tap. The card stays visible so customers know the dish exists. */
.prod-card.is-soldout .prod-card__media img { filter: grayscale(1); opacity: .4; }
.prod-card.is-soldout .prod-card__media > span[aria-hidden="true"] { filter: grayscale(1); opacity: .45; }
.prod-card.is-soldout .prod-card__name { color: var(--text-muted); }
.prod-card.is-soldout .prod-card__price { opacity: .75; }
.prod-card.is-soldout { cursor: default; }
.prod-card.is-highlight { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: var(--r-xl); animation: ksItemFlash 1.2s ease 2; }
@keyframes ksItemFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(66,255,51,0); } 50% { box-shadow: 0 0 0 10px rgba(66,255,51,.18); } }
[data-theme="dark"] .prod-card__soldout, [data-theme="dark"] .store-hero__basket-dot { color: #150404; }
.prod-card__name { font-size: 1rem; font-weight: 800; color: var(--text-strong); margin-bottom: 3px; letter-spacing: -.015em; }
.prod-card__store { font-size: .84rem; color: var(--text-muted); }
.prod-add { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: var(--green-950); border: 3px solid var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), background .15s var(--ease); }
.prod-add:active { transform: scale(.9); } .prod-add:hover { background: var(--lemon-400); }
/* In-place quantity: Add → − qty + in the same spot, so changing a
   quantity never needs the cart drawer. */
.prod-qty { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; }
.prod-qty .prod-add { position: static; }
.prod-add[hidden], .prod-stepper[hidden], [data-best-qty][hidden] { display: none !important; }
.prod-stepper { display: inline-flex; align-items: center; height: 42px; padding: 0 2px; border-radius: 999px; background: var(--brand); color: var(--green-950); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); }
.prod-stepper button { width: 30px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: inherit; font-size: 1.05rem; font-weight: 800; line-height: 1; border-radius: 50%; cursor: pointer; }
.prod-stepper button:active { transform: scale(.9); }
.prod-stepper__qty { min-width: 22px; text-align: center; font-size: .92rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.best-qty { position: absolute; top: 8px; right: 8px; z-index: 2; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--green-950); color: var(--brand); font-size: .76rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.mk-card__body .mk-btn { width: 100%; margin-top: 10px; }

/* ── Mini-market store page (motion + market extras) ───────── */
.store-hero.is-kenburns img { animation: storeZoom 18s ease-in-out infinite alternate; }
@keyframes storeZoom { from { transform: scale(1); } to { transform: scale(1.12); } }
.store-hero__shade { position: absolute; inset: 0; background: rgba(5,15,10,.16); pointer-events: none; }
.store-hero__top-right { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.store-hero__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--text-strong); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); font-size: 1rem; }
.store-hero__basket { position: static; }
.store-hero__basket-dot { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.store-hero__status { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px; background: rgba(8,20,13,.72); color: #fff; font-size: .78rem; font-weight: 800; padding: 7px 14px; border-radius: 999px; backdrop-filter: blur(6px); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: livePulse 1.8s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.store-title-main { min-width: 0; flex: 1; }
.store-sub { font-size: .84rem; color: var(--text-muted); margin-top: 3px; }
.store-rating.is-btn { cursor: pointer; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.store-rating.is-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.store-rating__score { font-size: .95rem; }
.store-rating__more { display: block; margin-top: 4px; font-size: .72rem; font-weight: 800; color: var(--link); }
.store-ticker { overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); margin-bottom: 14px; }
.store-ticker__track { display: inline-flex; white-space: nowrap; padding: 8px 0; font-size: .76rem; font-weight: 700; color: var(--text-muted); animation: zoneTick 24s linear infinite; }
.store-ticker__track span { padding-right: 8px; }
.store-more-btn { background: none; border: 0; color: var(--link); font-weight: 700; font-size: .88rem; cursor: pointer; padding: 6px 0; }
.best-row { margin-bottom: 18px; }
.best-row__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.best-row__head h3 { font-size: 1.15rem; } .best-row__head h3 small { font-size: .72rem; color: var(--text-muted); font-weight: 700; }
.best-row__head .pill { background: var(--brand-soft); color: var(--link); font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.best-rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.best-rail::-webkit-scrollbar { display: none; }
.best-card { position: relative; flex: 0 0 168px; width: 168px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 10px; cursor: pointer;
  opacity: 0; transform: translateY(10px); animation: mkRunIn .5s var(--ease) forwards; animation-delay: var(--d, 0ms);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-fast) var(--ease); }
.best-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.best-rank { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--brand); color: var(--green-950); font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.best-photo { width: 100%; aspect-ratio: 1/1; border-radius: var(--r-lg); background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; overflow: hidden; }
[data-theme="dark"] .best-photo { background: var(--surface-2); }
.best-photo img { width: 100%; height: 100%; object-fit: cover; }
.best-name { font-size: .86rem; font-weight: 800; color: var(--text-strong); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.best-meta { font-size: .74rem; color: var(--text-muted); font-weight: 700; }
.best-add { margin-top: 2px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: var(--green-950); font-size: .78rem; font-weight: 800; border-radius: 999px; padding: 7px 0; }
.store-toolbar { position: sticky; top: var(--nav-h); z-index: 25; margin: 0 -4px 16px; padding: 10px 4px 8px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line-soft); }
.store-search { position: relative; margin-bottom: 8px; }
.store-search > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: .85rem; pointer-events: none; }
.store-search input { width: 100%; min-height: 48px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); padding: 0 44px 0 42px; font-size: .9rem; color: var(--text); }
.store-search input:focus { outline: none; border-color: var(--brand); }
.store-search button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); font-size: .8rem; }
.store-toolbar__row { display: flex; align-items: flex-end; gap: 8px; }
.store-toolbar__row .store-cats { flex: 1; min-width: 0; margin-bottom: 0; border-bottom: 0; }
.store-view-toggle { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex-shrink: 0; }
.store-view-toggle button { width: 36px; height: 36px; border-radius: 50%; color: var(--text-muted); font-size: .85rem; }
.store-view-toggle button.active { background: var(--btn-bg); color: var(--btn-fg); }
.store-search-empty { text-align: center; padding: 30px 18px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-xl); margin-bottom: 18px; }
.prod-card { opacity: 0; transform: translateY(10px); animation: mkRunIn .45s var(--ease) forwards; animation-delay: var(--d, 0ms); }
.prod-card__low { position: absolute; left: 10px; top: 10px; background: var(--warn); color: #fff; font-size: .68rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.prod-grid.is-list { grid-template-columns: 1fr; }
.prod-grid.is-list .prod-card { flex-direction: row; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 10px; }
.prod-grid.is-list .prod-card__media { width: 92px; min-width: 92px; height: 92px; aspect-ratio: auto; margin-bottom: 0; border-radius: var(--r-lg); font-size: 2rem; }
.prod-grid.is-list .prod-card__price { left: 6px; bottom: 6px; font-size: .76rem; padding: 4px 9px; }
.prod-grid.is-list .prod-add { right: 6px; bottom: 6px; width: 36px; height: 36px; }
.prod-grid.is-list .prod-qty { right: 6px; bottom: auto; top: 6px; }
.prod-grid.is-list .prod-stepper { height: 36px; }
.prod-grid.is-list .prod-stepper button { height: 30px; width: 26px; }
@media (prefers-reduced-motion: reduce) { .store-hero.is-kenburns img, .store-ticker__track, .live-dot, .best-card, .prod-card { animation: none; } .best-card, .prod-card { opacity: 1; transform: none; } }

/* ============================================================
   CHECKOUT — "Delivery plan"
   ============================================================ */
body.ks-checkout { background: var(--bg-2); }
body.ks-checkout .mob-bottom-nav { display: none; }
body.ks-checkout .kscart-bar, body.ks-checkout .kscart-mini { display: none !important; }

.mkco { max-width: 700px; margin: 0 auto; padding: 0 4px 160px; }
.mkco-top { display: flex; align-items: center; gap: 14px; padding: 4px 0 6px; }
.mkco-top a { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--text-strong); font-size: 1.05rem; transition: border-color var(--t-fast) var(--ease); }
.mkco-top a:hover { border-color: var(--brand); }
.mkco-top h1 { font-size: 1.75rem; line-height: 1.1; } .mkco-top p { margin: 2px 0 0; font-size: .88rem; color: var(--text-muted); }
.mkco-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); margin: 16px 0; overflow: hidden; }
.mkco-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 14px; }
.mkco-card__head h2 { font-size: 1.15rem; }
.mkco-chip, .mkco-card__head .mkco-chip { font-size: .74rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); }
.mkco-chip.is-ok { background: var(--brand-soft); color: var(--link); } .mkco-chip.is-warn { background: var(--warn-soft); color: var(--warn); }

.mkco-map { width: 100%; height: 200px; background: var(--surface-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.mkco-map.is-hidden { display: none; }
.mkco-drop__pinrow { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 6px; }
.mkco-drop__pin { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--link); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.mkco-drop__label { font-weight: 800; color: var(--text-strong); font-size: 1rem; } .mkco-drop__sub { font-size: .84rem; color: var(--text-muted); margin-top: 2px; }
.mkco-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 20px 4px; }
.mkco-actions button { min-height: 48px; padding: 12px 10px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-strong); font-weight: 800; font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.mkco-actions button:hover { border-color: var(--green-500); }
.mkco-actions button.is-primary { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; } .mkco-actions button.is-primary:hover { background: var(--btn-bg-hover); }
.mkco-zones { display: flex; gap: 8px; overflow-x: auto; padding: 12px 20px 2px; scrollbar-width: none; }
.mkco-zones::-webkit-scrollbar { display: none; }
.mkco-zone { flex: 0 0 auto; white-space: nowrap; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-muted); font-size: .82rem; font-weight: 700; transition: all var(--t-fast) var(--ease); }
.mkco-zone:hover { border-color: var(--brand); }
.mkco-zone.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--link); }
.mkco-field { padding: 12px 20px 16px; }
.mkco-field label, .mkco-grid label { display: block; font-size: .8rem; font-weight: 800; color: var(--text-muted); margin-bottom: 6px; }
.mkco-hint { padding: 0 20px 18px; margin: 0; font-size: .82rem; color: var(--text-muted); }

.mkco-note { margin: 0 20px 12px; padding: 13px 15px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: .85rem; font-weight: 600; line-height: 1.5; } .mkco-note b { color: inherit; }
.mkco-legs { padding: 4px 20px 20px; display: grid; gap: 18px; }
.mkco-leg { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 14px 8px; background: var(--surface); min-width: 0; }
.mkco-leg__num { position: absolute; top: -11px; left: 14px; background: var(--btn-bg); color: var(--btn-fg); font-size: .7rem; font-weight: 800; letter-spacing: .04em; padding: 4px 11px; border-radius: 999px; }
.mkco-leg__store { font-weight: 800; color: var(--text-strong); font-size: 1.02rem; margin: 4px 0 12px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mkco-leg__ico { flex-shrink: 0; }
.mkco-leg__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.mkco-leg__km { flex-shrink: 0; font-size: .74rem; font-weight: 800; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-strong); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.mkco-route { display: grid; gap: 0; background: var(--surface-2); border-radius: var(--r-md); padding: 13px 14px; margin-bottom: 6px; min-width: 0; }
.mkco-route__row { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.mkco-route__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); flex-shrink: 0; margin-top: 4px; box-shadow: 0 0 0 4px var(--brand-soft); }
.mkco-route__dot--end { background: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.mkco-route__body { flex: 1; min-width: 0; }
.mkco-route__tag { font-size: .72rem; font-weight: 800; color: var(--text-dim); margin-bottom: 2px; }
.mkco-route__addr { font-size: .86rem; line-height: 1.45; color: var(--text-strong); font-weight: 600; overflow-wrap: break-word; word-break: break-word; }
.mkco-route__conn { width: 0; min-height: 16px; margin: 4px 0 4px 5px; border-left: 2px dashed var(--line-strong); }
.mkco-route__km { flex-shrink: 0; font-size: .74rem; font-weight: 800; color: var(--text-muted); white-space: nowrap; align-self: flex-start; background: var(--surface); border: 1px dashed var(--line-strong); padding: 3px 10px; border-radius: 999px; }
.mkco-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.mkco-line__info { flex: 1; min-width: 0; }
.mkco-line__name { font-weight: 700; font-size: .93rem; color: var(--text-strong); overflow-wrap: break-word; } .mkco-line__price { font-size: .78rem; color: var(--text-muted); }
.mkco-line__total { font-weight: 800; font-family: var(--f-num); min-width: 70px; text-align: right; font-size: .93rem; }
.mkco-stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex-shrink: 0; }
.mkco-stepper__btn { width: 40px; height: 40px; border-radius: 50%; font-size: 1.15rem; font-weight: 800; line-height: 1; color: var(--text-strong); display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .12s var(--ease), background .12s var(--ease), opacity .12s; user-select: none; }
.mkco-stepper__btn:active, .mkco-stepper__btn.is-pressed { transform: scale(.86); }
.mkco-stepper__btn--plus { background: var(--btn-bg); color: var(--btn-fg); }
.mkco-stepper__btn--minus.is-min { opacity: .45; } .mkco-stepper__btn:disabled { opacity: .4; cursor: not-allowed; }
.mkco-stepper__qty { min-width: 30px; text-align: center; font-weight: 800; font-size: .95rem; display: inline-block; }
.mkco-stepper__qty.qty-bump, [data-qty].qty-bump { animation: mkco-bump .25s var(--ease-spring, ease); }
@keyframes mkco-bump { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.mkco-breakdown.is-updating { opacity: .55; transition: opacity .2s; }

.mkco-grid { padding: 0 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .mkco-grid .full { grid-column: 1 / -1; }
.mkco-breakdown { padding: 0 20px 6px; }
.mkco-fee { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; font-size: .9rem; color: var(--text-muted); padding: 6px 0; }
.mkco-fee span:first-child { min-width: 0; flex: 1; overflow-wrap: break-word; } .mkco-fee span:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mkco-fee--leg { padding-left: 14px; font-size: .84rem; }
.mkco-fee--total { font-size: 1.12rem; font-weight: 800; color: var(--text-strong); border-top: 1px dashed var(--line-strong); margin-top: 8px; padding-top: 14px; }
.mkco-fee--total b { font-family: var(--f-disp); font-size: 1.3rem; letter-spacing: -.02em; }
.mkco-pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 20px 6px; }
.mkco-pay button { min-height: 68px; padding: 12px 6px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); color: var(--text-strong); font-weight: 700; font-size: .85rem; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; justify-content: center; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.mkco-pay button:hover:not(:disabled) { border-color: var(--green-500); }
.mkco-pay button.active { background: var(--brand-soft); border-color: var(--brand); color: var(--text-strong); }
.mkco-pay button:disabled { opacity: .4; } .mkco-pay button i { font-size: 1.1rem; }
.mkco-loyalty { margin: 10px 20px 0; }
.mkco-loyalty label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 13px; background: var(--brand-soft); border-radius: var(--r-md); font-weight: 600; color: var(--text-strong); }
.mkco-error { color: var(--danger); font-size: .86rem; font-weight: 600; padding: 12px 20px 18px; display: none; }
.mkco-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 900; }
.mkco-cta__inner { max-width: 700px; margin: 0 auto; } .mkco-cta .btn { width: 100%; }
.mkco-cta__sub { text-align: center; font-size: .8rem; color: var(--text-muted); margin-top: 8px; }
.mkco-cta__sub.is-error { color: var(--danger); font-weight: 700; }
.mkco-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.mkco-gift { margin: 16px 0 0; padding: 15px 16px; border: 1.5px dashed var(--pink); border-radius: var(--r-xl); background: var(--pink-soft); display: flex; align-items: center; gap: 12px; }
.mkco-gift input { width: 22px; height: 22px; accent-color: var(--pink); }
.mkco-gift__t { font-weight: 800; color: var(--text-strong); font-size: .95rem; } .mkco-gift__s { font-size: .82rem; color: var(--text-muted); }

@media (min-width: 900px) { .mkco { max-width: 740px; } .mkco-map { height: 240px; } }
@media (max-width: 640px) {
  .mkco { padding: 0 0 170px; } .mkco-top h1 { font-size: 1.45rem; }
  .mkco-card { border-radius: var(--r-lg); } .mkco-card__head { padding: 16px 14px 12px; } .mkco-card__head h2 { font-size: 1.05rem; }
  .mkco-legs { padding: 4px 12px 14px; } .mkco-leg { padding: 16px 12px 6px; } .mkco-route { padding: 11px 12px; } .mkco-route__addr { font-size: .83rem; }
  .mkco-grid { grid-template-columns: 1fr; padding: 0 14px 14px; } .mkco-breakdown { padding: 0 14px 6px; } .mkco-pay { padding: 8px 14px 4px; }
  .mkco-actions { padding: 8px 14px 4px; } .mkco-field { padding: 10px 14px 14px; } .mkco-hint { padding: 0 14px 14px; } .mkco-drop__pinrow { padding: 12px 14px 4px; } .mkco-note { margin: 0 14px 10px; } .mkco-zones { padding: 10px 14px 2px; } .mkco-loyalty { margin: 10px 14px 0; } .mkco-error { padding: 10px 14px 16px; }
}
@media (max-width: 400px) {
  .mkco-line { flex-wrap: wrap; } .mkco-line__info { flex: 1 1 100%; } .mkco-line__total { margin-left: auto; } .mkco-stepper__btn { width: 44px; height: 44px; }
  .mkco-actions { grid-template-columns: 1fr; } .mkco-leg__store { font-size: .94rem; }
}
@media (max-width: 480px) { .kscart-bar { width: calc(100% - 16px); bottom: calc(var(--bottom-h) + 22px); } .kscart-bar__cta { padding: 13px 18px; } .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .store-title-row h1 { font-size: 1.45rem; } .kscart-bar__park span { display: none; } }

/* The gift banner/toggle use display:flex, which silently beat the [hidden] attribute and showed "Gift mode" on normal orders. */
.mkco-gift[hidden], .mkco-main[hidden], #mkcoMain[hidden], #mkcoGiftOrigin[hidden] { display: none !important; }

/* Keep the floating support bubble clear of the sticky cart bar */
@media (max-width: 900px) { body.ks-has-cartbar #ksSupportFloat { bottom: calc(var(--ks-tab-h, 66px) + 92px + env(safe-area-inset-bottom, 0px)) !important; width: 44px !important; height: 44px !important; }
  .kscart-bar__park { display: none !important; } }
