:root {
    --mp-ink: #111827;
    --mp-muted: #6b7280;
    --mp-line: #e5e7eb;
    --mp-bg: #f6f7fb;
    --mp-card: #ffffff;
    --mp-brand: #4338ca;
    --mp-brand-dark: #3730a3;
    --mp-brand-soft: #eef2ff;
    --mp-accent: #f59e0b;
    --mp-green: #047857;
    --mp-radius: 14px;
    --mp-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 4px 14px rgba(17, 24, 39, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--mp-ink); background: var(--mp-bg); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.mp-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* header */
.mp-header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--mp-line); }
.mp-header__row { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.mp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.mp-brand em { font-style: normal; color: var(--mp-brand); }
.mp-brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--mp-brand), #7c3aed); color: #fff; font-weight: 800; }
.mp-search { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; background: var(--mp-bg); border: 1px solid var(--mp-line); border-radius: 999px; padding: 4px 4px 4px 14px; color: var(--mp-muted); }
.mp-search:focus-within { border-color: var(--mp-brand); background: #fff; box-shadow: 0 0 0 3px var(--mp-brand-soft); }
.mp-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font: inherit; font-size: 15px; color: var(--mp-ink); padding: 8px 0; }
.mp-search button { border: 0; background: var(--mp-brand); color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.mp-search button:hover { background: var(--mp-brand-dark); }

/* hero */
.mp-hero { background: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #6d28d9 100%); color: #fff; padding: 28px 0 22px; }
.mp-hero h1 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.mp-hero p { margin-top: 6px; color: #e0e7ff; max-width: 640px; font-size: 15px; }
.mp-segments { display: flex; gap: 8px; margin-top: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.mp-segments::-webkit-scrollbar { display: none; }
.mp-segments a { flex: none; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; font-weight: 500; white-space: nowrap; }
.mp-segments a:hover, .mp-segments a.is-on { background: #fff; color: var(--mp-brand-dark); }

/* layout */
.mp-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 40px; align-items: start; }
.mp-filters { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); padding: 18px; position: sticky; top: 84px; }
.mp-filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 16px; }
.mp-close { display: none; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--mp-muted); }
.mp-field { display: block; margin: 0 0 14px; padding: 0; border: 0; font-size: 12px; font-weight: 600; color: var(--mp-muted); text-transform: uppercase; letter-spacing: .04em; }
.mp-field legend { padding: 0; margin-bottom: 0; }
.mp-field select, .mp-range input { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--mp-line); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--mp-ink); text-transform: none; letter-spacing: 0; font-weight: 400; }
.mp-field select:disabled { background: var(--mp-bg); color: var(--mp-muted); }
.mp-field select:focus, .mp-range input:focus { outline: 0; border-color: var(--mp-brand); box-shadow: 0 0 0 3px var(--mp-brand-soft); }
.mp-range { display: flex; align-items: center; gap: 8px; }
.mp-range span { margin-top: 6px; font-size: 12px; text-transform: none; font-weight: 400; }
.mp-filters__actions { display: flex; gap: 8px; margin-top: 6px; }

.mp-btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mp-brand); background: var(--mp-brand); color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 10px; cursor: pointer; }
.mp-btn:hover { background: var(--mp-brand-dark); }
.mp-btn--ghost { background: #fff; color: var(--mp-brand); }
.mp-btn--ghost:hover { background: var(--mp-brand-soft); }
.mp-filters__actions .mp-btn { flex: 1; }

/* results bar */
.mp-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-count { color: var(--mp-muted); font-size: 14px; margin-right: auto; }
.mp-count strong { color: var(--mp-ink); }
.mp-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mp-muted); }
.mp-sort select { padding: 9px 12px; border: 1px solid var(--mp-line); border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--mp-ink); }
.mp-filter-toggle { display: none; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.mp-chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--mp-brand-soft); color: var(--mp-brand-dark); font-size: 13px; font-weight: 500; }
.mp-chip:hover { background: #e0e7ff; }
.mp-chip--clear { background: transparent; border: 1px dashed var(--mp-line); color: var(--mp-muted); }

/* grid + card */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.mp-card { display: flex; flex-direction: column; background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.mp-card:hover { box-shadow: var(--mp-shadow); transform: translateY(-2px); }
.mp-card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: #eef0f6; }
.mp-card__media img { width: 100%; height: 100%; object-fit: cover; }
.mp-badge { position: absolute; top: 10px; left: 10px; background: var(--mp-green); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.mp-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.mp-tag { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--mp-brand-dark); background: var(--mp-brand-soft); padding: 2px 8px; border-radius: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-card__title { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.mp-card__title a:hover { color: var(--mp-brand); }
.mp-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mp-price strong { font-size: 17px; font-weight: 800; }
.mp-price s { color: var(--mp-muted); font-size: 13px; }
.mp-price__ask { color: var(--mp-muted); font-size: 14px; }
.mp-shop { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mp-muted); }
.mp-shop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-shop:hover { color: var(--mp-brand); }
.mp-place { font-size: 12px; color: var(--mp-muted); }
.mp-cta { margin-top: auto; text-align: center; padding: 10px 12px; border-radius: 10px; background: var(--mp-brand); color: #fff; font-size: 14px; font-weight: 600; }
.mp-cta:hover { background: var(--mp-brand-dark); }
.mp-card__body > .mp-place + .mp-cta, .mp-card__body > .mp-shop + .mp-cta { margin-top: 10px; }

.mp-more { display: flex; justify-content: center; margin-top: 26px; }
.mp-more .mp-btn[disabled] { opacity: .6; cursor: progress; }
.mp-empty { text-align: center; background: var(--mp-card); border: 1px dashed var(--mp-line); border-radius: var(--mp-radius); padding: 56px 20px; }
.mp-empty h2 { font-size: 20px; }
.mp-empty p { margin: 6px 0 18px; color: var(--mp-muted); }

/* browse + footer */
.mp-browse { background: #fff; border-top: 1px solid var(--mp-line); padding: 28px 0; }
.mp-browse h2 { font-size: 15px; margin: 18px 0 10px; }
.mp-browse h2:first-child { margin-top: 0; }
.mp-browse ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.mp-browse a { font-size: 13px; color: var(--mp-muted); }
.mp-browse a:hover { color: var(--mp-brand); text-decoration: underline; }
.mp-footer { background: #111827; color: #9ca3af; font-size: 13px; padding: 22px 0; }
.mp-footer p + p { margin-top: 4px; }

/* tablet / mobile */
@media (max-width: 900px) {
    .mp-layout { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
    .mp-filter-toggle { display: inline-flex; }
    .mp-filters { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; max-height: 86vh; overflow-y: auto; border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .22s ease; padding-bottom: 24px; }
    .mp-filters.is-open { transform: none; }
    .mp-close { display: block; }
    .mp-scrim { position: fixed; inset: 0; background: rgba(17, 24, 39, .5); z-index: 40; }
    .mp-brand__text { display: none; }
    .mp-search { flex-basis: 0; }
}
@media (max-width: 560px) {
    .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .mp-card__body { padding: 10px; }
    .mp-card__title { font-size: 14px; }
    .mp-price strong { font-size: 15px; }
    .mp-sort span, .mp-sort { font-size: 12px; }
    .mp-sort { flex: 1; justify-content: flex-end; }
    .mp-sort select { max-width: 150px; padding: 8px; }
    .mp-hero { padding: 20px 0 16px; }
}
@media (prefers-reduced-motion: reduce) { .mp-card, .mp-filters { transition: none; } }
