/* Marketing tools of the shop (storefront/marketing.js). Everything is prefixed "mk-" and takes its look from the CSS
   variables of the theme (--brand, --brand-d, --brand-l, --ink, --muted, --line, --bg, --sand, --r, --font, --display),
   so it fits every shop and a project's own accent colour. Layers: bars in the page flow; social proof 45 (over the
   sticky buy bar); popup 65 - under the cookie notice (70) and the cart drawer (75), which it must never cover. */
.mk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mk-x { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; flex: none; }
.mk-x:hover { background: rgba(0, 0, 0, .08); }

/* ---------- announcement bar: lines of the ticker with a link / countdown */
.mk-tick a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mk-countdown { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- bars: promo (above the ticker) and free delivery (under it); never on the checkout */
.mk-bar { position: relative; font: 500 .88rem/1.35 var(--font, system-ui, sans-serif); }
.mk-bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; max-width: 1200px; margin: 0 auto; padding: 8px 16px; text-align: center; min-width: 0; }
[data-mk-view=checkout] .mk-bar, [data-mk-view=thanks] .mk-bar { display: none; }
.mk-promo { background: var(--brand, #b5532f); color: #fff; }
.mk-promo .mk-bar-in { padding: 8px 52px; min-height: 44px; }
.mk-promo a { color: inherit; }
.mk-promo .mk-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: #fff; }
.mk-promo .mk-x:hover { background: rgba(255, 255, 255, .18); }
.mk-promo :focus-visible { outline-color: #fff; }
.mk-promo-msg { overflow-wrap: anywhere; }
.mk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 3px 2px 10px; border: 1px dashed rgba(255, 255, 255, .7); border-radius: 999px; white-space: nowrap; }
.mk-chip code, .mk-code code { font: 700 .95em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }
.mk-copy { min-height: 30px; padding: 4px 12px; border: 0; border-radius: 999px; background: #fff; color: var(--brand-d, #96421f); font: 600 .8rem var(--font, system-ui, sans-serif); cursor: pointer; }
.mk-copy.mk-done { background: var(--brand-l, #f8ebe2); }
.mk-ship { background: var(--sand, #f3eadd); color: var(--ink, #2b2420); border-bottom: 1px solid var(--line, #e7ddd0); }
.mk-ship .mk-bar-in { padding: 6px 16px 7px; }
.mk-ship.mk-ok .mk-ship-t { font-weight: 700; }
.mk-ship-bar { display: block; height: 3px; background: var(--line, #e7ddd0); }
.mk-ship-bar i { display: block; height: 100%; background: var(--brand, #b5532f); transition: width .4s ease; }

/* ---------- low-stock badge next to the price */
.mk-stock { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--brand-l, #f8ebe2); color: var(--brand-d, #96421f); font: 700 .8rem/1.6 var(--font, system-ui, sans-serif); white-space: nowrap; }

/* ---------- popup (newsletter, exit intent): sheet from the bottom on a phone, centred card from 600 px */
.mk-pop-wrap { position: fixed; inset: 0; z-index: 65; display: flex; align-items: flex-end; justify-content: center; background: rgba(30, 22, 16, .45); animation: mk-fade .18s; }
.mk-pop { position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow: auto; background: var(--card, #fff); color: var(--ink, #2b2420); border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(30, 22, 16, .25); padding-bottom: env(safe-area-inset-bottom); animation: mk-up .22s; outline: none; }
.mk-pop > .mk-x { position: absolute; top: 6px; right: 6px; z-index: 1; background: rgba(255, 255, 255, .92); color: var(--ink, #2b2420); }
.mk-pop > .mk-x:hover { background: var(--sand, #f3eadd); }
.mk-pop-img { display: block; width: 100%; max-height: 200px; object-fit: cover; }
.mk-pop-body { padding: 24px 20px 20px; }
.mk-pop h2 { margin: 0 44px 8px 0; font: 700 1.45rem/1.2 var(--display, Georgia, serif); color: var(--ink, #2b2420); }
.mk-pop-img + .mk-pop-body h2 { margin-right: 0; }
.mk-pop p { margin: 0 0 14px; color: var(--muted, #6f655d); font-size: .95rem; }
.mk-form { display: grid; gap: 12px; }
.mk-form input[type=email] { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line, #e7ddd0); border-radius: var(--r-sm, 10px); background: #fff; color: var(--ink, #2b2420); font: 1rem var(--font, system-ui, sans-serif); }
.mk-form input[type=email]:focus { outline: none; border-color: var(--brand, #b5532f); box-shadow: 0 0 0 3px var(--brand-l, #f8ebe2); }
.mk-check { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; line-height: 1.4; color: var(--muted, #6f655d); cursor: pointer; }
.mk-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--brand, #b5532f); }
.mk-pop .mk-err { margin: 0; color: var(--err, #b3261e); font-size: .88rem; font-weight: 600; }
.mk-btn { min-height: 48px; padding: 10px 18px; border: 1px solid var(--brand, #b5532f); border-radius: var(--r, 14px); background: var(--brand, #b5532f); color: #fff; font: 600 1rem var(--font, system-ui, sans-serif); cursor: pointer; }
.mk-btn:hover { background: var(--brand-d, #96421f); border-color: var(--brand-d, #96421f); }
.mk-btn[disabled] { opacity: .6; cursor: default; }
.mk-done-box { display: grid; gap: 14px; }
.mk-done-box h2 { margin-bottom: 0; }
.mk-pop .mk-code { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 12px 12px 12px 16px; border: 2px dashed var(--brand, #b5532f); border-radius: var(--r, 14px);
  background: var(--brand-l, #f8ebe2); color: var(--ink, #2b2420); font-size: 1.2rem; }
.mk-code .mk-copy { min-height: 40px; padding: 6px 16px; background: var(--brand, #b5532f); color: #fff; font-size: .9rem; }
.mk-code .mk-copy.mk-done { background: var(--brand-d, #96421f); }
@media (min-width: 600px) {
  .mk-pop-wrap { align-items: center; padding: 20px; }
  .mk-pop { border-radius: 20px; box-shadow: 0 20px 60px rgba(30, 22, 16, .3); }
  .mk-pop-body { padding: 28px 28px 26px; }
}

/* ---------- social proof toast (bottom left, above the sticky buy bar of a phone) */
.mk-proof { position: fixed; left: 8px; bottom: calc(10px + var(--sticky-h, 0px) + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 10px; width: min(340px, calc(100vw - 16px));
  padding: 8px 4px 8px 12px; background: var(--card, #fff); color: var(--ink, #2b2420); border: 1px solid var(--line, #e7ddd0); border-radius: var(--r, 14px); box-shadow: 0 8px 28px rgba(30, 22, 16, .16); animation: mk-up .25s; }
.mk-proof-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-l, #f8ebe2); color: var(--brand, #b5532f); flex: none; }
.mk-proof-in { flex: 1; min-width: 0; }
.mk-proof p { margin: 0; }
.mk-proof-t { font: 600 .86rem/1.3 var(--font, system-ui, sans-serif); overflow-wrap: anywhere; }
.mk-proof-ago { font-size: .76rem; color: var(--muted, #6f655d); }
.mk-note { padding: 12px 16px; font: 600 .9rem/1.35 var(--font, system-ui, sans-serif); }
body.consent-open .mk-proof { display: none; }
@media (min-width: 900px) { .mk-proof { left: 20px; bottom: 20px; } }

@keyframes mk-fade { from { opacity: 0; } }
@keyframes mk-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk-pop-wrap, .mk-pop, .mk-proof { animation: none; } .mk-ship-bar i { transition: none; } }
