/* Flagship cards (2026-10-19): Done For You, Google & Reviews and Bullpen at
   the top of the shop and on the products and services page. Markup in
   resources/views/partials/flagship-plans.blade.php. Everything is scoped
   under .zg-flagship so the shop and page styles around it are untouched. */

.zg-flagship {
    /* 2026-10-20: the site's own brand blue; the hex is the fallback. */
    --zf-blue: var(--zoogaboog-blue, #01aade);
    --zf-blue-dark: #0085ae;
    --zf-blue-ink: #006f92;
    --zf-ink: #0f172a;
    --zf-text: #334155;
    --zf-muted: #64748b;
    --zf-line: #e2e8f0;
    --zf-accent: var(--zf-blue);
    --zf-accent-soft: rgba(1, 170, 222, 0.12);
    position: relative;
    box-sizing: border-box;
    min-width: 0;
}

.zg-flagship *,
.zg-flagship *::before,
.zg-flagship *::after {
    box-sizing: border-box;
}

.zg-flagship[hidden],
.zg-flag-card[hidden] {
    display: none !important;
}

/* ---- heading ---------------------------------------------------------- */

.zg-flagship__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    margin: 0 0 16px;
}

.zg-flagship__head-text {
    min-width: 0;
    flex: 1 1 360px;
}

.zg-flagship__eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--zf-blue-ink);
}

.zg-flagship__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--zf-ink);
}

.zg-flagship__lede {
    margin: 6px 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--zf-text);
    max-width: 44rem;
}

.zg-flagship__all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--zf-blue-ink);
    text-decoration: none;
    white-space: nowrap;
}

.zg-flagship__all:hover,
.zg-flagship__all:focus-visible {
    color: var(--zf-ink);
    text-decoration: underline;
}

/* ---- the three cards -------------------------------------------------- */

.zg-flagship__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.zg-flag-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px 22px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--zf-line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    color: var(--zf-text);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* A soft wash of the card's colour across the top corner. */
.zg-flag-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 120px;
    background: radial-gradient(120% 100% at 100% 0%, var(--zf-accent-soft) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* The thin accent line along the top edge. */
.zg-flag-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--zf-accent);
}

.zg-flag-card:hover {
    transform: translateY(-3px);
    border-color: var(--zf-accent);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 16px 36px rgba(15, 23, 42, 0.12);
    color: var(--zf-text);
    text-decoration: none;
}

.zg-flag-card:focus-visible {
    outline: 3px solid var(--zf-blue);
    outline-offset: 3px;
}

.zg-flag-card--google-reviews {
    --zf-accent: #f59e0b;
    --zf-accent-soft: rgba(245, 158, 11, 0.14);
}

.zg-flag-card--bullpen {
    --zf-accent: #6366f1;
    --zf-accent-soft: rgba(99, 102, 241, 0.13);
}

.zg-flag-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.zg-flag-card__icon {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--zf-accent);
    color: #fff;
    font-size: 1.35rem;
    overflow: hidden;
    box-shadow: 0 6px 16px var(--zf-accent-soft);
}

.zg-flag-card__icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.zg-flag-card__tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: right;
}

.zg-flag-card__name {
    display: block;
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--zf-ink);
}

.zg-flag-card__outcome {
    display: block;
    margin: 0 0 14px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--zf-text);
}

.zg-flag-card__list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0 0 18px;
}

.zg-flag-card__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--zf-text);
}

.zg-flag-card__item .bi {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--zf-accent);
}

.zg-flag-card__foot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--zf-line);
}

.zg-flag-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    color: var(--zf-ink);
}

.zg-flag-card__from {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--zf-muted);
}

.zg-flag-card__amount {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.zg-flag-card__per {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--zf-muted);
}

.zg-flag-card__was {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--zf-muted);
}

.zg-flag-card__note {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--zf-blue-ink);
}

.zg-flag-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 11px;
    /* 2026-10-20 (no dark blocks): the button is the brand blue,
       the site's primary button look, on every card. */
    background: var(--zf-blue);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    transition: background 0.2s ease, gap 0.2s ease;
}

.zg-flag-card:hover .zg-flag-card__cta {
    background: var(--zf-blue-dark);
    gap: 12px;
}

/* 2026-10-19: the plan the signed-in client already has. */
.zg-flag-card .zg-flag-card__cta.zg-flag-card__cta--yours,
.zg-flag-card:hover .zg-flag-card__cta.zg-flag-card__cta--yours {
    background: #ecfdf5;
    color: #047857;
    box-shadow: inset 0 0 0 1px #a7f3d0;
    gap: 8px;
}

/* Done For You: the top rung. 2026-10-20 ("no dark blocks"): it was
   a dark navy card. Now a white card like the others, set apart by a brand
   blue border, a blue wash in the corner and a solid blue tag pill. Same
   content, same founding price line. */
.zg-flag-card--top {
    --zf-accent: var(--zf-blue);
    --zf-accent-soft: rgba(1, 170, 222, 0.16);
    border: 2px solid var(--zf-blue);
    box-shadow: 0 2px 6px rgba(1, 133, 174, 0.10), 0 18px 40px rgba(1, 133, 174, 0.16);
}

.zg-flag-card--top::before {
    height: 160px;
}

.zg-flag-card--top:hover {
    border-color: var(--zf-blue-dark);
    box-shadow: 0 2px 6px rgba(1, 133, 174, 0.14), 0 24px 48px rgba(1, 133, 174, 0.22);
}

.zg-flag-card--top .zg-flag-card__tag {
    background: var(--zf-blue);
    color: #fff;
}

.zg-flag-card--top .zg-flag-card__note {
    color: var(--zf-blue-ink);
}

.zg-flagship__terms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--zf-muted);
    text-align: center;
}

.zg-flagship__terms .bi {
    color: #16a34a;
}

/* ---- where it sits ----------------------------------------------------- */

/* Inside the /shop top panel, above the product rails. */
.shop-top-zone--panel .zg-flagship--shop {
    padding: 4px 4px 0;
}

.shop-top-zone--panel .zg-flagship--shop + .shop-product-rail {
    margin-top: 4px;
}

/* The clients' browse page, above the Featured row. */
.zg-flagship--browse {
    margin: 4px 0 30px;
}

/* The products and services page: its own band above the categories. */
.zg-flagship-band {
    padding: 3rem 0 0.5rem;
}

.zg-flagship--page .zg-flagship__title {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.zg-flagship--page .zg-flagship__lede {
    font-size: 1.02rem;
}

.zg-flagship--page .zg-flagship__grid {
    gap: 20px;
}

.zg-flagship--page .zg-flag-card {
    padding: 26px 24px 22px;
}

/* ---- smaller screens --------------------------------------------------- */

@media (max-width: 1100px) {
    .zg-flag-card {
        padding: 20px 18px 18px;
    }

    .zg-flag-card__name {
        font-size: 1.22rem;
    }
}

/* Tablets and phones: one swipeable row, the next card peeking in. */
@media (max-width: 900px) {
    .zg-flagship__grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* The row runs to the edge of the panel it sits in (--zf-bleed is
           never more than that panel's own side padding), so a swiped card
           slides off the edge instead of being cut short inside it. */
        padding: 6px var(--zf-bleed, 0px) 26px;
        margin: -6px calc(-1 * var(--zf-bleed, 0px)) -20px;
        scroll-padding-inline: var(--zf-bleed, 0px);
    }

    /* Shop panel: 14px panel padding plus the 4px around the cards. */
    .zg-flagship--shop {
        --zf-bleed: 16px;
    }

    /* Products and services page: the container keeps 12px or more. */
    .zg-flagship--page {
        --zf-bleed: 12px;
    }

    .zg-flagship__grid::-webkit-scrollbar {
        display: none;
    }

    .zg-flag-card {
        flex: 0 0 min(340px, 78%);
        scroll-snap-align: start;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 10px rgba(15, 23, 42, 0.06);
    }

    .zg-flag-card--top {
        box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12), 0 6px 12px rgba(1, 133, 174, 0.16);
    }

    .zg-flag-card:hover {
        transform: none;
    }

    .zg-flagship--page .zg-flag-card {
        padding: 22px 20px 20px;
    }
}

@media (max-width: 520px) {
    .zg-flagship__head {
        margin-bottom: 12px;
    }

    .zg-flagship__title {
        font-size: 1.25rem;
    }

    .zg-flagship--page .zg-flagship__title {
        font-size: 1.45rem;
    }

    .zg-flagship__lede {
        font-size: 0.9rem;
    }

    .zg-flagship__all {
        min-height: 32px;
    }

    .zg-flag-card,
    .zg-flagship--page .zg-flag-card {
        flex-basis: 84%;
        padding: 18px 16px 16px;
        border-radius: 16px;
    }

    .zg-flag-card__top {
        margin-bottom: 12px;
    }

    .zg-flag-card__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 1.2rem;
    }

    .zg-flag-card__name {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .zg-flag-card__outcome {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .zg-flag-card__list {
        gap: 6px;
        margin-bottom: 14px;
    }

    .zg-flag-card__item {
        font-size: 0.84rem;
    }

    .zg-flag-card__foot {
        padding-top: 12px;
    }

    .zg-flag-card__amount {
        font-size: 1.55rem;
    }

    .zg-flagship-band {
        padding-top: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zg-flag-card,
    .zg-flag-card__cta {
        transition: none;
    }

    .zg-flag-card:hover {
        transform: none;
    }
}
