/* ============================================================================
   wwwroot/css/marketplace-category.css   (v3 — single-viewport + liquid glass)
   ----------------------------------------------------------------------------
   Styles for /marketplace/category/{slug} (Views/Marketplace/Category.cshtml).

   v3 (2026-05) goals
   ------------------
   1. SINGLE VIEWPORT — hero, filter, chips, AND cards all sit above the fold
      at 100% browser zoom on a standard laptop (1366×768 logical), without
      asking the user to scroll. v2 was overflowing on common screen sizes;
      v3 compresses every section by ~30% vertically.

   2. LIQUID-GLASS CARDS — inspired by the iOS-style frosted card aesthetic.
      Each business card has a translucent frosted ring, soft inner-top
      glow, layered hero image with rounded inset, and an identity strip
      whose avatar overlaps the hero/body boundary for a premium tactile feel.

   3. PAGINATION DOTS — the horizontal grid now has a visible position
      indicator (1 ● ○ ○) so users immediately understand there are more
      cards off-screen. The arrow buttons from Phase 2 stay; the dots
      sit underneath as a passive overview.

   4. REGISTER CTA IN HERO — the previous "Be one of the first to list"
      empty-state tile is gone (it was a tall empty card eating valuable
      strip real-estate). The Register CTA moves into the hero's right
      side as a primary button. The strip then shows ONLY business cards.

   Theming model (unchanged)
   -------------------------
   Inherits base tokens from .mp-page (marketplace-landing.css). Adds:
       --mp-accent      (e.g. #56C4F8)
       --mp-accent-rgb  (e.g. "86, 196, 248")
   Emitted inline in Category.cshtml from the seeded AccentHex. Change
   those two values and the entire page re-tints.
   ============================================================================ */


/* ════════════════════════════════════════════════════════════════════════
   PAGE ROOT — accent token + glass tokens
   ════════════════════════════════════════════════════════════════════════ */

.mp-category-page {
    /* default accent overridden inline per category */
    --mp-accent: #56C4F8;
    --mp-accent-rgb: 86, 196, 248;
    /* Accent variants — used for hovers, soft tints, ring focus */
    --mp-accent-soft: rgba(var(--mp-accent-rgb), 0.10);
    --mp-accent-softer: rgba(var(--mp-accent-rgb), 0.05);
    --mp-accent-strong: rgba(var(--mp-accent-rgb), 0.22);
    --mp-accent-ring: rgba(var(--mp-accent-rgb), 0.30);
    /* ── Liquid-glass tokens (v3) ──────────────────────────────────
       The glass aesthetic uses a translucent ring (border), a soft
       backdrop-filter blur on the card surface, and a tiny inner-top
       highlight that mimics a curved glass edge catching light. */
    --mp-glass-bg: rgba(255, 255, 255, 0.72);
    --mp-glass-border: rgba(255, 255, 255, 0.55);
    --mp-glass-shadow: 0 12px 36px rgba(14, 14, 17, 0.10), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
    --mp-glass-blur: 14px;
}


/* ════════════════════════════════════════════════════════════════════════
   SHELL — vertical stack: breadcrumb → hero → filter → chips → results
   ────────────────────────────────────────────────────────────────────────
   v3 tightens the gaps so the whole layout fits on a 768-tall viewport.
   ════════════════════════════════════════════════════════════════════════ */

.mp-cat-shell {
    width: 100%;
    max-width: 1500px;
    margin-inline: auto;
    padding: 4px clamp(16px, 3.6vw, 48px) 12px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.9vw, 12px);
    overflow: hidden;
}


/* ════════════════════════════════════════════════════════════════════════
   BREADCRUMB — Home › Marketplace › Category
   ════════════════════════════════════════════════════════════════════════ */

.mp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
    font-size: 0.74rem;
    color: var(--mp-muted);
    padding: 2px 0;
}

.mp-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    color: var(--mp-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--mp-cloud-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}

    .mp-breadcrumb-link:hover {
        background: #fff;
        color: var(--mp-ink);
        border-color: var(--mp-accent-strong);
    }

    .mp-breadcrumb-link svg {
        width: 12px;
        height: 12px;
    }

.mp-breadcrumb-sep {
    color: var(--mp-muted-2);
    font-size: 0.85rem;
}

.mp-breadcrumb-current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(var(--mp-accent-rgb), 0.18) 0%, rgba(var(--mp-accent-rgb), 0.08) 100%);
    color: var(--mp-ink);
    font-weight: 700;
    border: 1px solid rgba(var(--mp-accent-rgb), 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .mp-breadcrumb-current::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--mp-accent);
        box-shadow: 0 0 0 3px rgba(var(--mp-accent-rgb), 0.20);
    }


/* ════════════════════════════════════════════════════════════════════════
   HERO — compact strip (v3 — half the height of v1)
   ────────────────────────────────────────────────────────────────────────
   Three columns: glyph | text | actions (stats + Register CTA).
   The Register CTA replaces the previous empty-state tile so the strip
   shows ONLY business cards — saves the dominant empty card from Image 2.
   ════════════════════════════════════════════════════════════════════════ */

.mp-cat-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 1.8vw, 22px);
    padding: clamp(10px, 1.1vw, 14px) clamp(14px, 1.8vw, 22px);
    background: var(--mp-glass-bg);
    backdrop-filter: blur(var(--mp-glass-blur));
    -webkit-backdrop-filter: blur(var(--mp-glass-blur));
    border: 1px solid var(--mp-glass-border);
    border-radius: 18px;
    box-shadow: var(--mp-glass-shadow);
    overflow: hidden;
    background-image: linear-gradient(100deg, var(--mp-accent-soft) 0%, transparent 38%), radial-gradient(ellipse 80% 60% at 100% 0%, var(--mp-accent-softer) 0%, transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.55) 100%);
}

    .mp-cat-hero::before {
        content: "";
        position: absolute;
        inset-inline: 0;
        top: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--mp-accent) 0%, var(--mp-sunset) 60%, var(--mp-sky) 100%);
        opacity: 0.85;
    }


/* ── Glyph block — smaller in v3 (44px not 64px) ───────────────────────── */
.mp-cat-hero-glyph {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mp-accent) 0%, color-mix(in srgb, var(--mp-accent) 70%, var(--mp-ink) 30%) 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(var(--mp-accent-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.30);
    flex-shrink: 0;
}

    .mp-cat-hero-glyph svg {
        width: 22px;
        height: 22px;
    }


/* ── Text block — compact (eyebrow optional, smaller title) ───────────── */
.mp-cat-hero-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mp-cat-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mp-muted);
}

.mp-cat-hero-eyebrow-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--mp-accent);
    box-shadow: 0 0 0 2px rgba(var(--mp-accent-rgb), 0.22);
}

.mp-cat-hero-title {
    margin: 0;
    font-family: var(--mp-font);
    font-weight: 800;
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    line-height: 1.08;
    letter-spacing: -0.018em;
    color: var(--mp-ink);
}

.mp-cat-hero-tag {
    margin: 0;
    font-size: clamp(0.74rem, 0.85vw, 0.82rem);
    color: var(--mp-muted);
    line-height: 1.4;
    max-width: 64ch;
}


/* ── Actions block (right side) — stats + Register CTA inline ────────── */
.mp-cat-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.mp-cat-hero-stats {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mp-cat-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 5px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--mp-cloud-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mp-cat-hero-stat-num {
    font-family: var(--mp-font);
    font-weight: 800;
    font-size: 1rem;
    color: var(--mp-ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mp-cat-hero-stat-label {
    margin-top: 2px;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-muted);
}


/* ── Register CTA — primary button at the right of the hero ──────────── */
/*    Replaces the old empty-state tile entirely. Always visible — even   */
/*    when the strip is populated, providers can still register here.    */
.mp-cat-hero-register {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--mp-sunset) 0%, #F89622 100%);
    color: #fff;
    text-decoration: none;
    font-family: var(--mp-font);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.005em;
    box-shadow: 0 8px 20px rgba(245, 130, 32, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.30);
    transition: transform 0.2s ease, box-shadow 0.22s ease;
    white-space: nowrap;
}

    .mp-cat-hero-register:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(245, 130, 32, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.40);
    }

    .mp-cat-hero-register svg {
        width: 13px;
        height: 13px;
    }


/* ════════════════════════════════════════════════════════════════════════
   FILTER ROW — search + location + submit (compressed)
   ════════════════════════════════════════════════════════════════════════ */

.mp-cat-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto;
    align-items: center;
    gap: 6px;
    padding: 5px;
    background: var(--mp-glass-bg);
    backdrop-filter: blur(var(--mp-glass-blur));
    -webkit-backdrop-filter: blur(var(--mp-glass-blur));
    border: 1px solid var(--mp-glass-border);
    border-radius: 100px;
    box-shadow: var(--mp-glass-shadow);
}

.mp-cat-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    min-width: 0;
}

    .mp-cat-field.is-location {
        border-left: 1px solid var(--mp-cloud-2);
    }

.mp-cat-field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mp-muted);
    flex-shrink: 0;
}

    .mp-cat-field-icon svg {
        width: 15px;
        height: 15px;
    }

.mp-cat-field-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 0.84rem;
    color: var(--mp-ink);
    padding: 6px 0;
}

    .mp-cat-field-input::placeholder {
        color: var(--mp-muted);
    }


.mp-cat-filter-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 0;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--mp-accent) 0%, color-mix(in srgb, var(--mp-accent) 75%, var(--mp-ink) 25%) 100%);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(var(--mp-accent-rgb), 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 0.18s ease, box-shadow 0.22s ease;
    white-space: nowrap;
}

    .mp-cat-filter-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(var(--mp-accent-rgb), 0.40);
    }

    .mp-cat-filter-submit:active {
        transform: translateY(0);
    }


/* ════════════════════════════════════════════════════════════════════════
   CHIP STRIP — subcategory filter pills (compressed)
   ════════════════════════════════════════════════════════════════════════ */

.mp-cat-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 24px 2px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--mp-accent-rgb), 0.30) transparent;
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
}

    .mp-cat-chips::-webkit-scrollbar {
        height: 4px;
    }

    .mp-cat-chips::-webkit-scrollbar-thumb {
        background: rgba(var(--mp-accent-rgb), 0.30);
        border-radius: 4px;
    }

.mp-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--mp-cloud-2);
    color: var(--mp-ink-2);
    text-decoration: none;
    font-family: var(--mp-font);
    font-weight: 600;
    font-size: 0.74rem;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    flex-shrink: 0;
}

    .mp-cat-chip:hover {
        background: #fff;
        border-color: var(--mp-accent-strong);
        transform: translateY(-1px);
    }

    .mp-cat-chip.is-active {
        background: var(--mp-ink);
        color: #fff;
        border-color: var(--mp-ink);
        box-shadow: 0 4px 12px rgba(14, 14, 17, 0.22);
    }

.mp-cat-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    border-radius: 100px;
    background: rgba(14, 14, 17, 0.08);
    color: var(--mp-ink-2);
    font-size: 0.62rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.mp-cat-chip.is-active .mp-cat-chip-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.mp-cat-chip-star {
    color: var(--mp-sunset);
    font-size: 0.78rem;
}


/* ════════════════════════════════════════════════════════════════════════
   RESULTS — header + grid + pagination dots
   ════════════════════════════════════════════════════════════════════════ */

.mp-cat-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    flex: 1 1 auto;
}

.mp-cat-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.mp-cat-results-title {
    margin: 0;
    font-family: var(--mp-font);
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--mp-ink);
    letter-spacing: -0.005em;
}

.mp-cat-results-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--mp-cloud-2);
    color: var(--mp-muted);
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* ── Grid wrap — positions arrows + dots ─────────────────────────────── */
.mp-cat-grid-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}


/* ── Grid — horizontal-scroll strip with 5-in-view on desktop ────────── */
.mp-cat-grid {
    display: grid;
    grid-auto-flow: column;
    /* v3 — slightly tighter to make room for the right-edge fade.
       Math: 1500px shell − 56px gutters ≈ 1388. 5 cards × 264 + 4 × 14 = 1376. */
    grid-auto-columns: clamp(232px, calc((100% - 56px) / 5), 268px);
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 28px 10px 4px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    outline: none;
    flex: 1 1 auto;
    min-height: 0;
}

    .mp-cat-grid::-webkit-scrollbar {
        height: 0;
        display: none;
    }

    .mp-cat-grid:focus-visible {
        outline: 3px solid var(--mp-accent-ring);
        outline-offset: 2px;
        border-radius: 14px;
    }

/* No-overflow state → drop the mask so the last card isn't faded */
.mp-cat-grid-wrap[data-pager-overflow="false"] > .mp-cat-grid {
    mask-image: none;
    -webkit-mask-image: none;
    padding-right: 4px;
}


/* ── Pager arrow buttons (Phase 2, glassed-up for v3) ────────────────── */
.mp-cat-pager {
    position: absolute;
    top: calc(50% - 14px); /* center on card area, accounting for dot row below */
    transform: translateY(-50%);
    z-index: 4;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--mp-glass-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(var(--mp-glass-blur));
    -webkit-backdrop-filter: blur(var(--mp-glass-blur));
    color: var(--mp-ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(14, 14, 17, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.18s ease, color 0.18s ease, opacity 0.22s ease;
    -webkit-appearance: none;
    appearance: none;
}

    .mp-cat-pager svg {
        width: 15px;
        height: 15px;
        pointer-events: none;
    }

    .mp-cat-pager:hover {
        transform: translateY(-50%) scale(1.06);
        background: var(--mp-ink);
        color: #fff;
        border-color: var(--mp-ink);
        box-shadow: 0 12px 26px rgba(14, 14, 17, 0.30);
    }

    .mp-cat-pager:focus-visible {
        outline: none;
        box-shadow: 0 8px 20px rgba(14, 14, 17, 0.14), 0 0 0 3px var(--mp-accent-ring);
    }

    .mp-cat-pager:active {
        transform: translateY(-50%) scale(0.96);
    }

    .mp-cat-pager[aria-disabled="true"] {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-50%) scale(0.92);
    }

.mp-cat-pager-prev {
    left: -10px;
}

.mp-cat-pager-next {
    right: -10px;
}

.mp-cat-grid-wrap[data-pager-overflow="false"] .mp-cat-pager {
    opacity: 0;
    pointer-events: none;
}


/* ── Pagination DOTS — new in v3 ─────────────────────────────────────── */
/*
   Below the strip, a compact row of dots shows total pages and the
   current position. Layout:
       ●  ○  ○        ← 3 pages, currently on page 1
       1 of 3 (text fallback for screen readers, visually hidden)
   The dot count is computed by JS at render time as
   Math.ceil(scrollWidth / clientWidth). Click a dot to jump to that page.
*/
.mp-cat-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 0 2px;
    min-height: 18px;
}

.mp-cat-pages-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(14, 14, 17, 0.16);
    cursor: pointer;
    transition: background 0.22s ease, transform 0.22s ease, width 0.28s ease;
    flex-shrink: 0;
}

    .mp-cat-pages-dot:hover {
        background: rgba(14, 14, 17, 0.32);
        transform: scale(1.18);
    }

    .mp-cat-pages-dot.is-active {
        background: var(--mp-accent);
        width: 22px;
        border-radius: 100px;
        box-shadow: 0 0 0 3px rgba(var(--mp-accent-rgb), 0.20);
    }

    .mp-cat-pages-dot:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px var(--mp-accent-ring);
    }

/* Hide the pagination row when there's only one page (no scroll) */
.mp-cat-grid-wrap[data-pager-overflow="false"] .mp-cat-pages {
    visibility: hidden;
}

/* Screen-reader-only label inside .mp-cat-pages */
.mp-cat-pages-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ════════════════════════════════════════════════════════════════════════
   BUSINESS CARD — LIQUID GLASS (v3, full redesign)
   ────────────────────────────────────────────────────────────────────────
   Inspired by the frosted-glass identity card aesthetic in the design
   reference. Layout (top→bottom):

       ┌─────────────────────────────────────┐
       │  ╭─────────────────────────────╮    │  ← outer glass ring
       │  │                             │    │
       │  │      HERO IMAGE (4:3)       │    │  ← rounded inset
       │  │                             │    │
       │  ╰─────────────────────────────╯    │
       │      ⓞ                              │  ← avatar overlaps boundary
       │   ┌─────────────────────────┐       │
       │   │ Business Name           │       │  ← identity strip
       │   │ Punchy tagline          │       │
       │   │ Two-line description… │       │
       │   ├─────────────────────────┤       │
       │   │ ✓ Verified · 🛡 Licence │       │  ← badges
       │   └─────────────────────────┘       │
       │   📍 Location      Get a quote →    │  ← foot
       └─────────────────────────────────────┘

   Notable design moves:
     • Outer card has translucent white background + frosted blur ring
     • Hero image sits in its own rounded inset (10px from card edges)
     • Avatar OVERLAPS the hero/body boundary by 18px — premium tactile feel
     • Soft inner-top highlight (white at 60%) catches the eye
     • 4:3 hero (not 1:1) frees vertical space so we fit above the fold
   ════════════════════════════════════════════════════════════════════════ */

.mp-biz {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Liquid-glass card surface */
    background: var(--mp-glass-bg);
    backdrop-filter: blur(var(--mp-glass-blur));
    -webkit-backdrop-filter: blur(var(--mp-glass-blur));
    border: 1px solid var(--mp-glass-border);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(14, 14, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.90);
    padding: 10px 10px 12px;
    transition: transform 0.3s cubic-bezier(.2, .7, .2, 1), box-shadow 0.3s cubic-bezier(.2, .7, .2, 1), border-color 0.22s ease;
    scroll-snap-align: start;
    overflow: hidden;
    isolation: isolate;
}

    /* Inner-top highlight — fakes a curved glass edge catching light */
    .mp-biz::before {
        content: "";
        position: absolute;
        inset-inline: 8%;
        top: 0;
        height: 22px;
        background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(255, 255, 255, 0.85) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
        opacity: 0.7;
    }

    /* Soft accent radial behind the card content on hover */
    .mp-biz::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(var(--mp-accent-rgb), 0.10) 0%, transparent 65%);
        opacity: 0;
        transition: opacity 0.32s ease;
        pointer-events: none;
        z-index: 0;
    }

    .mp-biz > * {
        position: relative;
        z-index: 1;
    }

    .mp-biz:hover {
        transform: translateY(-4px);
        border-color: rgba(var(--mp-accent-rgb), 0.36);
        box-shadow: 0 20px 42px rgba(14, 14, 17, 0.14), 0 0 0 1px rgba(var(--mp-accent-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    }

        .mp-biz:hover::after {
            opacity: 1;
        }


    /* ── Sample card variant — softly dashed glass ring ──────────────────── */
    .mp-biz.is-sample {
        border-style: dashed;
        border-color: rgba(var(--mp-accent-rgb), 0.45);
    }

.mp-biz-ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 100px;
    background: var(--mp-ink);
    color: #fff;
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(14, 14, 17, 0.30);
}


/* ════════════════════════════════════════════════════════════════════════
   HERO MEDIA — rounded inset within the card (4:3 to save vertical)
   ════════════════════════════════════════════════════════════════════════ */

.mp-biz-hero {
    position: relative;
    width: 100%;
    /* 4:3 — frees ~25% vertical compared to 1:1, lets the card fit above
       the fold while still feeling spacious. */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--mp-accent-rgb), 0.22) 0%, transparent 65%), linear-gradient(180deg, rgba(var(--mp-accent-rgb), 0.08) 0%, rgba(14, 14, 17, 0.04) 100%), var(--mp-cloud);
    /* Inner shadow — gives the inset surface depth */
    box-shadow: inset 0 1px 3px rgba(14, 14, 17, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.mp-biz-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.55s cubic-bezier(.2, .7, .2, 1);
}

.mp-biz[data-image-fit="contain"] .mp-biz-hero-img {
    object-fit: contain;
    padding: 14%;
    background: transparent;
}

.mp-biz:hover .mp-biz-hero-img {
    transform: scale(1.05);
}

.mp-biz[data-image-fit="contain"]:hover .mp-biz-hero-img {
    transform: scale(1.02);
}

/* Placeholder gradient + monogram for no-image rows */
.mp-biz-hero-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--mp-accent) 0%, color-mix(in srgb, var(--mp-accent) 50%, var(--mp-ink) 50%) 100%);
    color: #fff;
}

.mp-biz-hero-monogram {
    font-family: var(--mp-font);
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 2.7rem);
    letter-spacing: 0.04em;
    text-shadow: 0 4px 14px rgba(14, 14, 17, 0.32);
    line-height: 1;
}

/* Recommended pill on the hero (top-right corner inside the inset) */
.mp-biz-hero-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px 4px 7px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--mp-ink);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--mp-glass-border);
    box-shadow: 0 4px 12px rgba(14, 14, 17, 0.18);
}

    .mp-biz-hero-flag svg {
        width: 11px;
        height: 11px;
        color: var(--mp-sunset);
        flex-shrink: 0;
    }


/* ════════════════════════════════════════════════════════════════════════
   IDENTITY STRIP — avatar overlapping hero/body boundary
   ────────────────────────────────────────────────────────────────────────
   The avatar circle sits ON the boundary, half above (over the hero) and
   half below (over the body). This is the move that gives the card a
   premium "business-card" feel — the headshot in the design reference
   does the same trick.
   ════════════════════════════════════════════════════════════════════════ */

.mp-biz-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: flex-start;
    padding: 0 4px;
    /* Pull the row UP so the avatar overlaps the hero by ~half its height */
    margin-top: -18px;
}

.mp-biz-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mp-accent) 0%, var(--mp-ink) 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Frosted glass ring around the avatar — makes the overlap feel
       intentional, like the avatar is "popping" out of the glass. */
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 6px 14px rgba(14, 14, 17, 0.22), 0 0 0 4px rgba(var(--mp-accent-rgb), 0.30);
}

    .mp-biz-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.mp-biz-avatar-initials {
    font-family: var(--mp-font);
    font-weight: 800;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}


.mp-biz-identity-text {
    min-width: 0;
    /* Push the text down ~16px so the baseline aligns with the avatar's
       bottom half (not its center) — matches the design reference. */
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mp-biz-name {
    margin: 0;
    font-family: var(--mp-font);
    font-weight: 800;
    font-size: 0.94rem;
    letter-spacing: -0.012em;
    line-height: 1.15;
    color: var(--mp-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.mp-biz-sub-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 1px 7px;
    border-radius: 100px;
    background: rgba(var(--mp-accent-rgb), 0.12);
    color: var(--mp-ink-2);
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid rgba(var(--mp-accent-rgb), 0.24);
    text-transform: uppercase;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ════════════════════════════════════════════════════════════════════════
   BODY — tagline + description + badges (compressed)
   ════════════════════════════════════════════════════════════════════════ */

.mp-biz-body {
    padding: 6px 4px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
}

.mp-biz-tagline {
    margin: 0;
    font-family: var(--mp-font);
    font-weight: 600;
    font-size: 0.74rem;
    line-height: 1.32;
    color: var(--mp-ink);
    letter-spacing: -0.005em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-biz-desc {
    margin: 0;
    font-size: 0.7rem;
    color: var(--mp-muted);
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-biz-badges {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mp-biz-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.60);
    color: var(--mp-ink-2);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--mp-cloud-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .mp-biz-badge svg {
        width: 9px;
        height: 9px;
        flex-shrink: 0;
    }

    .mp-biz-badge.is-verified {
        background: rgba(63, 169, 217, 0.12);
        color: #0F6E97;
        border-color: rgba(63, 169, 217, 0.32);
    }

    .mp-biz-badge.is-licensed {
        background: rgba(14, 14, 17, 0.06);
        color: var(--mp-ink);
        border-color: rgba(14, 14, 17, 0.18);
    }


/* ════════════════════════════════════════════════════════════════════════
   FOOT — location + CTA
   ════════════════════════════════════════════════════════════════════════ */

.mp-biz-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 4px 0;
    margin-top: 6px;
    border-top: 1px solid rgba(14, 14, 17, 0.06);
}

.mp-biz-loc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: 0.66rem;
    color: var(--mp-muted);
    font-weight: 600;
}

    .mp-biz-loc svg {
        width: 11px;
        height: 11px;
        flex-shrink: 0;
        color: var(--mp-accent);
    }

.mp-biz-loc-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mp-ink-2);
}

.mp-biz-loc-sep {
    margin: 0 2px;
    color: var(--mp-muted-2);
}

.mp-biz-loc-prov {
    color: var(--mp-muted);
}

.mp-biz-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 11px;
    border-radius: 100px;
    background: var(--mp-ink);
    color: #fff;
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    flex-shrink: 0;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(14, 14, 17, 0.18);
}

    .mp-biz-cta:hover {
        background: var(--mp-accent);
        transform: translateX(2px);
        box-shadow: 0 6px 14px rgba(var(--mp-accent-rgb), 0.36);
    }

    .mp-biz-cta svg {
        width: 10px;
        height: 10px;
    }

    .mp-biz-cta.is-sample {
        background: linear-gradient(135deg, var(--mp-accent) 0%, var(--mp-sunset) 100%);
    }


/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE — desktop breakpoints
   ════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1320px) {
    .mp-cat-grid {
        grid-auto-columns: clamp(232px, calc((100% - 42px) / 4), 268px);
    }
}

@media (max-width: 1080px) {
    .mp-cat-hero {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
    }

    .mp-cat-hero-actions {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: space-between;
        margin-top: 2px;
        padding-top: 6px;
        border-top: 1px solid var(--mp-cloud-2);
    }

    .mp-cat-grid {
        grid-auto-columns: clamp(220px, calc((100% - 28px) / 3), 268px);
    }
}

@media (max-width: 820px) {
    .mp-cat-grid {
        grid-auto-columns: clamp(220px, calc((100% - 14px) / 2), 268px);
    }

    .mp-cat-hero-stats {
        gap: 4px;
    }

    .mp-cat-hero-stat {
        min-width: 46px;
        padding: 4px 8px;
    }
}


/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE — phone (≤ 720px) — vertical stack, full breathing room
   ════════════════════════════════════════════════════════════════════════ */

@media (max-width: 720px) {
    .mp-page.mp-category-page {
        height: auto;
        min-height: var(--mp-page-h, 100vh);
        overflow-y: auto;
    }

    .mp-cat-shell {
        padding: 4px 14px 14px;
        gap: 8px;
        overflow: visible;
    }

    .mp-cat-hero {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 12px;
        border-radius: 14px;
    }

    .mp-cat-hero-glyph {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

        .mp-cat-hero-glyph svg {
            width: 20px;
            height: 20px;
        }

    .mp-cat-hero-title {
        font-size: 1rem;
    }

    .mp-cat-hero-tag {
        font-size: 0.74rem;
    }

    .mp-cat-hero-actions {
        grid-column: 1 / -1;
        margin-top: 2px;
        padding-top: 6px;
        border-top: 1px solid var(--mp-cloud-2);
        justify-content: space-between;
        align-items: center;
    }

    .mp-cat-hero-register {
        padding: 7px 14px;
        font-size: 0.76rem;
    }

    .mp-cat-filter {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 18px;
        padding: 6px;
        gap: 4px;
    }

    .mp-cat-field {
        padding: 4px 12px;
    }

        .mp-cat-field.is-location {
            border-left: none;
            border-top: 1px solid var(--mp-cloud-2);
        }

    .mp-cat-filter-submit {
        height: 38px;
        margin-top: 4px;
    }

    .mp-cat-grid {
        grid-auto-flow: row;
        grid-auto-columns: initial;
        grid-template-columns: minmax(0, 1fr);
        overflow-x: visible;
        scroll-snap-type: none;
        padding: 4px 0 4px;
        mask-image: none;
        -webkit-mask-image: none;
        max-width: 420px;
        margin-inline: auto;
        gap: 12px;
    }

    .mp-biz {
        width: 100%;
    }

    .mp-cat-pager,
    .mp-cat-pages {
        display: none;
    }
}


/* ════════════════════════════════════════════════════════════════════════
   A11Y — reduced motion + high contrast
   ════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .mp-biz,
    .mp-biz::after,
    .mp-biz-hero-img,
    .mp-biz-cta,
    .mp-cat-chip,
    .mp-cat-filter-submit,
    .mp-cat-hero-register,
    .mp-cat-pager,
    .mp-cat-pages-dot {
        transition: none !important;
    }

        .mp-biz:hover .mp-biz-hero-img {
            transform: none;
        }
}

@media (prefers-contrast: more) {
    .mp-category-page {
        --mp-glass-bg: rgba(255, 255, 255, 0.95);
        --mp-glass-border: rgba(14, 14, 17, 0.30);
    }

    .mp-biz {
        border-width: 1.5px;
    }
}


/* ════════════════════════════════════════════════════════════════════════
   HIDE FLOATING WIDGETS on category page (same rule as v2)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    body:has(.mp-category-page) .floating-engagement,
    body:has(.mp-category-page) .floating-settings-wrapper {
        display: none !important;
    }
}
