/* css/mktdir.css */
/* R88 · Weesify Marketplace store directory (/marketplace). Prefix: mkd-. Mobile first; light/dark via tokens; RTL-safe
   (logical properties); every animation has a prefers-reduced-motion end state and animates transform/opacity only. */

.mkd { --mkd-r: 22px; --mkd-neon: #E4FF3A; --mkd-neon-ink: #121405; --mkd-card: var(--surface); --mkd-soft: var(--surface-2); --mkd-shadow: 0 18px 50px -24px rgb(16 24 20 / .35); --mkd-ease: cubic-bezier(.2, .8, .2, 1); color: var(--text); background: var(--canvas); overflow-x: clip; }
:root[data-theme="dark"] .mkd { --mkd-shadow: 0 18px 50px -20px rgb(0 0 0 / .8); }
.mkd-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .mkd-wrap { padding-inline: clamp(20px, 4vw, 40px); } }
.mkd h1, .mkd h2, .mkd h3 { font-family: var(--font-display); color: var(--ink); letter-spacing: -.02em; margin: 0; }
.mkd-sec { padding-block: 56px; }
@media (min-width: 900px) { .mkd-sec { padding-block: 64px; } }
.mkd-sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-block-end: 22px; flex-wrap: wrap; }
.mkd-sec-head h2 { font-size: clamp(1.6rem, 4.6vw, 2.6rem); line-height: 1.08; max-width: 18ch; }
.mkd-sec-head p { margin: 8px 0 0; color: var(--text-muted); max-width: 52ch; }
.mkd-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-block-end: 10px; }
.mkd-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mkd-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 650; color: var(--ink); text-decoration: none; }
.mkd-link svg { width: 18px; height: 18px; transition: transform .25s var(--mkd-ease); }
.mkd-link:hover svg { transform: translateX(3px); }
[dir="rtl"] .mkd-link:hover svg { transform: translateX(-3px) scaleX(-1); }
.mkd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1px solid transparent; transition: transform .2s var(--mkd-ease), box-shadow .2s, background .2s; cursor: pointer; font-size: .98rem; }
.mkd-btn svg { width: 18px; height: 18px; }
.mkd-btn-ink { background: var(--ink); color: var(--canvas); box-shadow: 0 10px 26px -12px rgb(0 0 0 / .5); }
.mkd-btn-ink:hover { transform: translateY(-2px); }
.mkd-btn-ghost { background: var(--mkd-card); color: var(--ink); border-color: var(--line-strong); }
.mkd-btn-ghost:hover { border-color: var(--ink); }
.mkd-btn-neon { background: var(--mkd-neon); color: var(--mkd-neon-ink); }

/* ---------- Tabs (Stores / Templates) ---------- */
.mkd-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--mkd-soft); border: 1px solid var(--line); }
.mkd-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 650; font-size: .9rem; color: var(--text-muted); text-decoration: none; }
.mkd-tabs a svg { width: 16px; height: 16px; }
.mkd-tabs a[aria-current="page"] { background: var(--mkd-card); color: var(--ink); box-shadow: 0 4px 14px -8px rgb(0 0 0 / .35); }

/* ---------- Hero: one tilted card flies in, then fans into a spread ---------- */
.mkd-hero { position: relative; padding-block: 108px 40px; text-align: center; isolation: isolate; }
@media (min-width: 900px) { .mkd-hero { padding-block: 132px 64px; } }
.mkd-hero::before { content: ""; position: absolute; inset: 0 0 20%; z-index: -1; background: radial-gradient(60% 50% at 50% 30%, var(--accent-soft), transparent 70%), radial-gradient(40% 40% at 80% 60%, rgb(228 255 58 / .14), transparent 70%); }
.mkd-hero h1 { font-size: clamp(2.2rem, 8.4vw, 4.6rem); line-height: 1.02; max-width: 15ch; margin: 14px auto 0; }
.mkd-hero h1 em { font-style: normal; }
.mkd-hero h1 em .mkd-word { background: linear-gradient(100deg, #12B886, #7C5CFF 55%, #FF6A3D); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.mkd-hero-sub { max-width: 46ch; margin: 14px auto 0; color: var(--text-muted); font-size: 1.04rem; }
.mkd-word { display: inline-block; opacity: 0; transform: translateY(.4em); animation: mkd-word .7s var(--mkd-ease) forwards; animation-delay: calc(var(--w) * 70ms + 80ms); }
@keyframes mkd-word { to { opacity: 1; transform: none; } }

.mkd-fan { --cw: 116px; --gap: 60px; position: relative; height: 240px; margin: 22px auto 0; max-width: 1000px; perspective: 1200px; }
@media (min-width: 560px) { .mkd-fan { --cw: 150px; --gap: 84px; height: 280px; } }
@media (min-width: 900px) { .mkd-fan { --cw: 190px; --gap: 128px; height: 340px; } }
.mkd-fan-fly { position: absolute; inset: 0; animation: mkd-fly 1s var(--mkd-ease) both .15s; }
@keyframes mkd-fly { from { transform: translate(38%, 55%) rotate(24deg) scale(.55); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
[dir="rtl"] .mkd-fan-fly { animation-name: mkd-fly-rtl; }
@keyframes mkd-fly-rtl { from { transform: translate(-38%, 55%) rotate(-24deg) scale(.55); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.mkd-fan-card { position: absolute; inset-inline-start: 50%; top: 50%; width: var(--cw); aspect-ratio: 4 / 5; margin-inline-start: calc(var(--cw) / -2); margin-top: calc(var(--cw) * -.625); border-radius: 20px; overflow: hidden; background: var(--mkd-soft); box-shadow: var(--mkd-shadow), 0 0 0 4px var(--mkd-card); z-index: calc(10 - var(--ao));
  transform: translateX(calc(var(--o) * var(--gap))) translateY(calc(var(--ao) * 9px)) rotate(calc(var(--o) * 5deg));
  animation: mkd-fan 1.1s var(--mkd-ease) both; animation-delay: calc(1.05s + var(--ao) * 60ms); transition: transform .45s var(--mkd-ease); text-decoration: none; color: inherit; }
[dir="rtl"] .mkd-fan-card { transform: translateX(calc(var(--o) * var(--gap) * -1)) translateY(calc(var(--ao) * 9px)) rotate(calc(var(--o) * -5deg)); animation-name: mkd-fan-rtl; }
@keyframes mkd-fan { from { transform: translateX(0) translateY(0) rotate(-9deg); } }
@keyframes mkd-fan-rtl { from { transform: translateX(0) translateY(0) rotate(9deg); } }
.mkd-fan-card:hover, .mkd-fan-card:focus-visible { transform: translateX(calc(var(--o) * var(--gap))) translateY(calc(var(--ao) * 9px - 14px)) rotate(calc(var(--o) * 5deg)) scale(1.04); z-index: 20; }
.mkd-fan-card img, .mkd-fan-card .mkd-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkd-fan-card.is-far { display: none; }
@media (min-width: 560px) { .mkd-fan-card.is-far { display: block; } }

.mkd-chip { position: absolute; z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px 999px 999px 4px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--c, #3B5BFF); box-shadow: 0 10px 24px -10px var(--c, #3B5BFF); opacity: 0; animation: mkd-chip-in .5s var(--mkd-ease) forwards, mkd-bob 4.6s ease-in-out infinite; animation-delay: calc(1.9s + var(--d, 0) * 120ms), calc(2.4s + var(--d, 0) * 300ms); text-decoration: none; white-space: nowrap; }
.mkd-chip svg { width: 14px; height: 14px; }
.mkd-chip.is-dark-ink { color: var(--mkd-neon-ink); }
@keyframes mkd-chip-in { from { opacity: 0; transform: translateY(10px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes mkd-bob { 50% { translate: 0 -8px; } }
.mkd-chip.c1 { top: 2%; inset-inline-start: 4%; }
.mkd-chip.c2 { top: 0; inset-inline-end: 6%; border-radius: 999px 999px 4px 999px; }
.mkd-chip.c3 { bottom: 4%; inset-inline-start: 12%; }
.mkd-chip.c4 { bottom: 0; inset-inline-end: 14%; border-radius: 999px 999px 4px 999px; }
@media (max-width: 559px) { .mkd-chip.c3, .mkd-chip.c4 { display: none; } }

.mkd-find { position: relative; display: flex; align-items: center; gap: 6px; max-width: 560px; margin: 26px auto 0; padding: 6px; border-radius: 999px; background: var(--mkd-card); border: 1px solid var(--line-strong); box-shadow: var(--mkd-shadow); }
.mkd-find svg { width: 20px; height: 20px; flex: none; margin-inline-start: 12px; color: var(--text-muted); }
.mkd-find input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; font: inherit; color: var(--ink); outline: none; font-size: 1rem; }
.mkd-find button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--ink); color: var(--canvas); font-weight: 700; cursor: pointer; }
.mkd-find:focus-within { box-shadow: var(--mkd-shadow), 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.mkd-hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.mkd-hero-tabs { margin-top: 18px; }

/* ---------- Abstract art (fallback covers; never people or animals) ---------- */
.mkd-art { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, hsl(var(--h) 78% 64%), hsl(calc(var(--h) + 48) 82% 56%)); color: #fff; }
.mkd-art::before, .mkd-art::after { content: ""; position: absolute; border-radius: 50%; }
.mkd-art::before { width: 70%; aspect-ratio: 1; inset-inline-end: -18%; top: -14%; background: hsl(calc(var(--h) + 150) 90% 70% / .75); }
.mkd-art::after { width: 46%; aspect-ratio: 1; inset-inline-start: -10%; bottom: -10%; border-radius: 34% 66% 40% 60%; background: hsl(calc(var(--h) - 40) 85% 30% / .55); }
.mkd-art svg { position: relative; z-index: 1; width: 34%; height: 34%; max-width: 64px; max-height: 64px; stroke-width: 1.6; opacity: .95; }
:root[data-theme="dark"] .mkd-art { background: linear-gradient(135deg, hsl(var(--h) 60% 42%), hsl(calc(var(--h) + 48) 65% 34%)); }

/* ---------- Category carousel ---------- */
.mkd-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 44%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 18px; margin-inline: -16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.mkd-rail::-webkit-scrollbar { display: none; }
.mkd-rail > * { scroll-snap-align: start; }
@media (min-width: 720px) { .mkd-rail { grid-auto-columns: minmax(200px, 23%); } }
@media (min-width: 1100px) { .mkd-rail { grid-auto-columns: minmax(210px, 18.6%); margin-inline: 0; padding-inline: 0; } }
.mkd-rail-nav { display: none; gap: 8px; }
@media (min-width: 720px) { .mkd-rail-nav { display: inline-flex; } }
.mkd-rail-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--mkd-card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.mkd-rail-nav button svg { width: 18px; height: 18px; }
.mkd-rail-nav button:disabled { opacity: .35; cursor: default; }
.mkd-cat { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 172px; padding: 16px; border-radius: var(--mkd-r); background: var(--mkd-card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .3s var(--mkd-ease), box-shadow .3s; }
.mkd-cat:hover { transform: translateY(-4px); box-shadow: var(--mkd-shadow); }
.mkd-cat-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: hsl(var(--h) 90% 92%); color: hsl(var(--h) 70% 30%); transition: transform .4s var(--mkd-ease); }
:root[data-theme="dark"] .mkd-cat-ic { background: hsl(var(--h) 50% 20%); color: hsl(var(--h) 90% 78%); }
.mkd-cat:hover .mkd-cat-ic { transform: rotate(-8deg) scale(1.08); }
.mkd-cat-ic svg { width: 24px; height: 24px; }
.mkd-cat b { display: block; font-size: 1.02rem; margin-top: 18px; }
.mkd-cat small { color: var(--text-muted); font-size: .84rem; }
.mkd-cat::after { content: ""; position: absolute; width: 120px; height: 120px; inset-inline-end: -40px; bottom: -50px; border-radius: 50%; background: hsl(var(--h) 90% 70% / .18); transition: transform .5s var(--mkd-ease); }
.mkd-cat:hover::after { transform: scale(1.5); }
.mkd-cat.is-empty { opacity: .72; }

/* ---------- Product card ---------- */
.mkd-pc { position: relative; display: flex; flex-direction: column; border-radius: var(--mkd-r); background: var(--mkd-card); border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: var(--text); transition: transform .35s var(--mkd-ease), box-shadow .35s; min-width: 0; }
.mkd-pc:hover, .mkd-pc:focus-visible { transform: translateY(-5px); box-shadow: var(--mkd-shadow); }
.mkd-pc-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--mkd-soft); }
.mkd-pc-media img, .mkd-pc-media .mkd-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mkd-ease); }
.mkd-pc:hover .mkd-pc-media img, .mkd-pc:hover .mkd-pc-media .mkd-art { transform: scale(1.06); }
.mkd-pc-tag { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgb(255 255 255 / .9); color: #111; backdrop-filter: blur(6px); }
.mkd-pc-tag svg { width: 13px; height: 13px; }
.mkd-pc-tag.is-neon { background: var(--mkd-neon); color: var(--mkd-neon-ink); }
.mkd-pc-body { display: grid; gap: 3px; padding: 12px 14px 14px; }
.mkd-pc-store { font-size: .78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkd-pc-name { font-weight: 700; color: var(--ink); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.mkd-pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.mkd-pc-price { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.mkd-pc-sold { font-size: .74rem; color: var(--text-muted); }
.mkd-prow { grid-auto-columns: minmax(200px, 64%); }
@media (min-width: 720px) { .mkd-prow { grid-auto-columns: minmax(220px, 31%); } }
@media (min-width: 1100px) { .mkd-prow { grid-auto-columns: minmax(220px, 23.6%); } }

/* ---------- Featured stores: sticky stacked cards (scroll-driven where supported) ---------- */
.mkd-stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; view-timeline: --mkdstack block; }
.mkd-stack > li { position: sticky; top: calc(92px + var(--i) * 14px); }
.mkd-sc { --h: 160; display: grid; gap: 16px; padding: 16px; border-radius: 28px; background: var(--mkd-card); border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -36px rgb(0 0 0 / .45); transform-origin: 50% 0; overflow: hidden; position: relative; }
.mkd-sc::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 100% 0%, hsl(var(--h) 90% 70% / .16), transparent 60%); pointer-events: none; }
@media (min-width: 820px) { .mkd-sc { grid-template-columns: 1fr 1.25fr; align-items: center; gap: 28px; padding: 28px; } }
@supports (animation-timeline: view()) {
  .mkd-stack > li:not(:last-child) .mkd-sc { animation: mkd-recede linear both; animation-timeline: --mkdstack; animation-range: contain calc(var(--i) * var(--step)) contain calc((var(--i) + 1) * var(--step)); }
}
@keyframes mkd-recede { to { transform: scale(.93); filter: brightness(.94); } }
.mkd-sc-id { display: flex; align-items: center; gap: 14px; position: relative; }
.mkd-logo { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 50%), hsl(calc(var(--h) + 40) 75% 42%)); box-shadow: 0 0 0 3px var(--mkd-card); }
.mkd-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mkd-sc h3 { font-size: clamp(1.3rem, 4vw, 1.9rem); }
.mkd-sc-cat { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-muted); }
.mkd-sc-cat svg { width: 14px; height: 14px; }
.mkd-sc-blurb { margin: 14px 0 0; color: var(--text-muted); position: relative; }
.mkd-sc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; position: relative; }
.mkd-sc-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; }
.mkd-sc-thumbs a { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--mkd-soft); transition: transform .4s var(--mkd-ease); }
.mkd-sc-thumbs a:nth-child(2) { transform: translateY(14px); }
.mkd-sc-thumbs a:hover { transform: translateY(-6px) rotate(-1.5deg); }
.mkd-sc-thumbs img, .mkd-sc-thumbs .mkd-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mkd-sc-thumbs span.mkd-sc-price { position: absolute; inset-inline-start: 8px; bottom: 8px; z-index: 2; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: rgb(255 255 255 / .92); color: #111; }

/* ---------- Neon marquee band ---------- */
.mkd-band { width: 112%; margin-inline: -6%; background: var(--mkd-neon); color: var(--mkd-neon-ink); padding-block: 18px; overflow: hidden; transform: rotate(-1.6deg); margin-block: 40px; box-shadow: 0 20px 50px -30px rgb(120 140 0 / .7); }
.mkd-band:not(.is-alt) { position: relative; z-index: 1; }
[dir="rtl"] .mkd-band { transform: rotate(1.6deg); }
.mkd-band + .mkd-band, .mkd-band.is-alt { transform: rotate(1.2deg); margin-top: -34px; background: var(--ink); color: var(--canvas); }
.mkd-mq { display: flex; width: max-content; animation: mkd-mq 38s linear infinite; }
.mkd-band.is-alt .mkd-mq { animation-direction: reverse; animation-duration: 46s; }
[dir="rtl"] .mkd-mq { animation-direction: reverse; }
[dir="rtl"] .mkd-band.is-alt .mkd-mq { animation-direction: normal; }
.mkd-band:hover .mkd-mq, .mkd-band:focus-within .mkd-mq { animation-play-state: paused; }
@keyframes mkd-mq { to { transform: translateX(-50%); } }
.mkd-mq-set { display: flex; align-items: center; gap: 22px; padding-inline-end: 22px; flex: none; }
.mkd-mq-i { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 4vw, 2.2rem); letter-spacing: -.02em; white-space: nowrap; text-decoration: none; color: inherit; }
.mkd-mq-ic { width: 1.4em; height: 1.4em; border-radius: 10px; display: grid; place-items: center; background: var(--mkd-neon-ink); color: var(--mkd-neon); }
.mkd-band.is-alt .mkd-mq-ic { background: var(--mkd-neon); color: var(--mkd-neon-ink); }
.mkd-mq-ic svg { width: 60%; height: 60%; }
.mkd-mq-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; opacity: .5; flex: none; }

/* ---------- Masonry grid with filters + infinite load ---------- */
.mkd-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block-end: 18px; }
.mkd-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--mkd-card); color: var(--text); font-weight: 600; font-size: .88rem; text-decoration: none; cursor: pointer; }
.mkd-pill svg { width: 15px; height: 15px; }
.mkd-pill[aria-pressed="true"], .mkd-pill[aria-current="page"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.mkd-masonry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 8px; gap: 0 12px; }
@media (min-width: 720px) { .mkd-masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; } }
@media (min-width: 1100px) { .mkd-masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mkd-masonry > .mkd-pc { grid-row: span var(--rows, 38); margin-block-end: 12px; animation: mkd-pop .6s var(--mkd-ease) both; }
.mkd-masonry > .mkd-pc .mkd-pc-media { aspect-ratio: auto; flex: 1; min-height: 0; }
.mkd-masonry > .mkd-pc.v1 { --rows: 32; }
.mkd-masonry > .mkd-pc.v2 { --rows: 40; }
.mkd-masonry > .mkd-pc.v3 { --rows: 46; }
@media (max-width: 719px) { .mkd-masonry > .mkd-pc.v1 { --rows: 30; } .mkd-masonry > .mkd-pc.v2 { --rows: 35; } .mkd-masonry > .mkd-pc.v3 { --rows: 40; } }
.mkd-masonry > .mkd-pc.is-hl { box-shadow: 0 0 0 3px var(--mkd-neon), var(--mkd-shadow); }
@keyframes mkd-pop { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.mkd-more { display: grid; place-items: center; padding-block: 18px 6px; min-height: 76px; }
.mkd-more .mkd-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: mkd-spin .8s linear infinite; display: none; }
.mkd-more.is-loading .mkd-spin { display: block; }
.mkd-more.is-loading a { display: none; }
@keyframes mkd-spin { to { transform: rotate(360deg); } }
.mkd-grid-wrap { transition: opacity .2s; }
.mkd-grid-wrap.is-busy { opacity: .45; }
.mkd-count { color: var(--text-muted); font-size: .9rem; margin: 0; }
.mkd-empty { text-align: center; padding: 48px 18px; border-radius: var(--mkd-r); border: 1px dashed var(--line-strong); background: var(--mkd-soft); }
.mkd-empty-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--accent-soft); color: var(--accent-text); }
.mkd-empty-ic svg { width: 26px; height: 26px; }
.mkd-empty h3 { font-size: 1.2rem; }
.mkd-empty p { color: var(--text-muted); max-width: 44ch; margin: 8px auto 16px; }

/* ---------- Store-logo cloud ("Find your people") ---------- */
.mkd-cloud { position: relative; min-height: 600px; display: grid; place-items: center; text-align: center; }
@media (min-width: 720px) { .mkd-cloud { min-height: 520px; } }
@media (min-width: 900px) { .mkd-cloud { min-height: 560px; } }
.mkd-cloud-copy { position: relative; z-index: 2; max-width: 30ch; padding: 18px; }
.mkd-cloud-copy h2 { font-size: clamp(1.8rem, 6vw, 3.2rem); line-height: 1.05; }
.mkd-cloud-copy p { color: var(--text-muted); margin: 10px 0 16px; }
.mkd-bub { position: absolute; top: var(--y); inset-inline-start: var(--x); width: var(--s, 56px); height: var(--s, 56px); border-radius: 30%; display: grid; place-items: center; overflow: hidden; color: #fff; font-weight: 800; font-size: calc(var(--s, 56px) * .32); text-decoration: none; background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 50) 75% 44%)); box-shadow: 0 14px 30px -14px hsl(var(--h) 60% 30% / .7), 0 0 0 3px var(--mkd-card); animation: mkd-float 7s ease-in-out infinite; animation-delay: calc(var(--d) * -.9s); transition: scale .3s var(--mkd-ease); }
.mkd-bub:hover, .mkd-bub:focus-visible { scale: 1.15; z-index: 3; }
.mkd-bub img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
@keyframes mkd-float { 50% { translate: 0 -12px; rotate: 3deg; } }
@media (max-width: 719px) { .mkd-bub.is-wide { display: none; } }

/* ---------- Sell on Weesify teaser ---------- */
.mkd-sell { display: grid; gap: 14px; padding: 22px; border-radius: 32px; background: var(--ink); color: var(--canvas); position: relative; overflow: hidden; }
.mkd-sell::after { content: ""; position: absolute; width: 360px; height: 360px; inset-inline-end: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgb(228 255 58 / .35), transparent 65%); }
@media (min-width: 900px) { .mkd-sell { grid-template-columns: 1.1fr 1.4fr; align-items: center; padding: 44px; gap: 32px; } }
.mkd-sell h2 { color: var(--canvas); font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.05; }
.mkd-sell p { opacity: .78; margin: 12px 0 20px; max-width: 42ch; }
.mkd-steps { display: grid; gap: 10px; position: relative; z-index: 1; }
@media (min-width: 620px) { .mkd-steps { grid-template-columns: repeat(3, 1fr); } }
.mkd-step { padding: 18px; border-radius: 22px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); }
:root[data-theme="dark"] .mkd-step { background: rgb(0 0 0 / .06); border-color: rgb(0 0 0 / .1); }
.mkd-step.is-hot { background: var(--mkd-neon); color: var(--mkd-neon-ink); border-color: transparent; transform: translateY(-8px); }
.mkd-step-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgb(255 255 255 / .14); margin-bottom: 18px; }
.mkd-step.is-hot .mkd-step-ic { background: var(--mkd-neon-ink); color: var(--mkd-neon); }
.mkd-step-ic svg { width: 20px; height: 20px; }
.mkd-step b { display: block; font-size: 1.05rem; }
.mkd-step small { display: block; opacity: .75; margin-top: 4px; }

/* ---------- Listing pages (category / search) ---------- */
.mkd-lhead { padding-block: 104px 18px; }
@media (min-width: 900px) { .mkd-lhead { padding-block: 124px 26px; } }
.mkd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .86rem; color: var(--text-muted); }
.mkd-crumbs a { color: inherit; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.mkd-crumbs a:hover { color: var(--ink); }
.mkd-crumbs svg { width: 14px; height: 14px; }
.mkd-lhead h1 { font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1.04; margin-top: 12px; display: flex; align-items: center; gap: 14px; }
.mkd-lhead h1 .mkd-cat-ic { width: 56px; height: 56px; flex: none; }
.mkd-lhead p { color: var(--text-muted); margin: 10px 0 0; max-width: 56ch; }
.mkd-fbar { position: sticky; top: 84px; z-index: 20; display: flex; gap: 8px; align-items: center; padding: 8px; margin-inline: -8px; border-radius: 20px; background: rgb(var(--mk-paper-rgb, 255 255 255) / .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow-x: auto; scrollbar-width: none; }
:root[data-theme="dark"] .mkd-fbar { background: rgb(17 19 21 / .82); }
.mkd-fbar::-webkit-scrollbar { display: none; }
.mkd-field { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--mkd-card); color: var(--text); flex: none; font-size: .88rem; }
.mkd-field select, .mkd-field input { border: 0; background: none; font: inherit; color: var(--ink); min-height: 40px; outline: none; }
.mkd-field input { width: 64px; }
.mkd-field svg { width: 16px; height: 16px; color: var(--text-muted); }
.mkd-field:focus-within { border-color: var(--accent); }
.mkd-fbar .mkd-find-mini { flex: 1 0 180px; }
.mkd-fbar .mkd-find-mini input { width: 100%; }
.mkd-stores-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-block: 6px 26px; }
.mkd-sm { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--mkd-card); border: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 72px; transition: transform .3s var(--mkd-ease), box-shadow .3s; }
.mkd-sm:hover { transform: translateY(-3px); box-shadow: var(--mkd-shadow); }
.mkd-sm .mkd-logo { width: 46px; height: 46px; border-radius: 14px; font-size: .95rem; }
.mkd-sm b { display: block; color: var(--ink); }
.mkd-sm small { color: var(--text-muted); font-size: .8rem; }

/* ---------- Store profile ---------- */
.mkd-profile { position: relative; margin-top: 104px; border-radius: 32px; overflow: hidden; background: var(--mkd-card); border: 1px solid var(--line-strong); box-shadow: var(--mkd-shadow); }
@media (min-width: 900px) { .mkd-profile { margin-top: 124px; } }
.mkd-profile-band { height: 130px; background: linear-gradient(120deg, hsl(var(--h) 80% 62%), hsl(calc(var(--h) + 60) 80% 58%), hsl(calc(var(--h) + 140) 75% 62%)); position: relative; overflow: hidden; }
.mkd-profile-band::after { content: ""; position: absolute; width: 260px; height: 260px; inset-inline-end: 8%; top: -120px; border-radius: 40%; background: rgb(255 255 255 / .25); animation: mkd-spin 30s linear infinite; }
.mkd-profile-body { padding: 0 18px 22px; display: grid; gap: 12px; }
@media (min-width: 720px) { .mkd-profile-body { padding: 0 32px 32px; grid-template-columns: 1fr auto; align-items: end; } }
.mkd-profile .mkd-logo { width: 92px; height: 92px; border-radius: 28px; margin-top: -46px; font-size: 1.8rem; box-shadow: 0 0 0 5px var(--mkd-card), var(--mkd-shadow); position: relative; }
.mkd-profile h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); margin-top: 12px; }
.mkd-profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mkd-profile-blurb { color: var(--text-muted); margin: 12px 0 0; max-width: 60ch; }
.mkd-pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .mkd-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .mkd-pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Reveal on scroll (only when the script is running; content is visible without it) ---------- */
.mkd-js [data-mkd-reveal].is-pending { opacity: 0; transform: translateY(24px); }
.mkd-js [data-mkd-reveal] { transition: opacity .8s var(--mkd-ease), transform .8s var(--mkd-ease); transition-delay: calc(var(--rd, 0) * 80ms); }

@media (prefers-reduced-motion: reduce) {
  .mkd *, .mkd *::before, .mkd *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mkd .mkd-mq { animation: none !important; }
  .mkd .mkd-band { overflow-x: auto; }
  .mkd .mkd-stack > li .mkd-sc { animation: none !important; }
  .mkd-js [data-mkd-reveal].is-pending { opacity: 1; transform: none; }
}
.mkd-masonry > .mkd-empty-grid { grid-column: 1 / -1; grid-row: span 34; }
