/* ── PedigreeMaster Design System ──────────────────────────────────────────── */

:root {
    --pm-purple: #4a1a7a;
    --pm-purple-dark: #350f5c;
    --pm-purple-light: #6b2fa0;
    --pm-gold: #c9a227;
    --pm-gold-light: #f0c040;
    --pm-gold-dark: #a07c10;
    --pm-white: #ffffff;
    --pm-off-white: #f8f5ff;
    --pm-text-dark: #1a0a2e;
    --pm-shadow: 0 4px 20px rgba(74,26,122,.15);
    --pm-radius: .75rem;
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a0a2e;
    background: #fff;
}

.py-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* ── Color utilities ────────────────────────────────────────────────────────── */
.text-gold {
    color: var(--pm-gold-light) !important;
}

.text-purple {
    color: var(--pm-purple) !important;
}

.text-purple-75 {
    color: rgba(74,26,122,.75);
}

.text-white-75 {
    color: rgba(255,255,255,.75);
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn-gold {
    background: var(--pm-gold);
    border-color: var(--pm-gold);
    color: var(--pm-purple-dark);
    font-weight: 700;
}

    .btn-gold:hover {
        background: var(--pm-gold-light);
        border-color: var(--pm-gold-light);
        color: var(--pm-purple-dark);
    }

.btn-purple {
    background: var(--pm-purple);
    border-color: var(--pm-purple);
    color: #fff;
    font-weight: 700;
}

    .btn-purple:hover {
        background: var(--pm-purple-dark);
        border-color: var(--pm-purple-dark);
        color: #fff;
    }

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar-dark.bg-primary {
    background: var(--pm-purple-dark) !important;
    border-bottom: 3px solid var(--pm-gold);
}

.navbar-brand {
    color: var(--pm-gold) !important;
    font-size: 1.3rem;
}

    .navbar-brand:hover {
        color: var(--pm-gold-light) !important;
    }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.pm-hero {
    background: linear-gradient(135deg, var(--pm-purple-dark) 0%, var(--pm-purple) 60%, var(--pm-purple-light) 100%);
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

    .pm-hero::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #f8f5ff;
        clip-path: ellipse(55% 100% at 50% 100%);
    }

.pm-hero-small {
    background: linear-gradient(135deg, var(--pm-purple-dark) 0%, var(--pm-purple) 100%);
    border-bottom: 3px solid var(--pm-gold);
}

.pm-hero-logo {
    height: 80px;
    margin-right: 1rem;
}

.pm-logo-lockup {
    display: flex;
    align-items: center;
}

.pm-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.pm-hero-lead {
    color: rgba(255,255,255,.85);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 1.5rem 0 1rem;
}

.pm-pricing-callout {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(201,162,39,.4);
    border-radius: var(--pm-radius);
    padding: .75rem 1.25rem;
    color: rgba(255,255,255,.9);
    font-size: .95rem;
    display: inline-block;
}

/* ── Hero badge grid ────────────────────────────────────────────────────────── */
.pm-hero-badge {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
}

.pm-badge-inner {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(201,162,39,.35);
    border-radius: var(--pm-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: background .2s;
}

    .pm-badge-inner:hover {
        background: rgba(255,255,255,.18);
    }

.pm-badge-icon {
    font-size: 2rem;
    color: var(--pm-gold-light);
    display: block;
    margin-bottom: .5rem;
}

.pm-badge-text {
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
}

/* ── Sections ───────────────────────────────────────────────────────────────── */
.pm-section-light {
    background: var(--pm-off-white);
}

.pm-section-purple {
    background: linear-gradient(135deg, var(--pm-purple-dark) 0%, var(--pm-purple) 100%);
}

.pm-section-gold {
    background: var(--pm-gold);
}

.pm-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--pm-purple-dark);
    text-align: center;
}

.pm-section-sub {
    color: #666;
    font-size: 1.1rem;
    text-align: center;
}

/* ── Feature cards ──────────────────────────────────────────────────────────── */
.pm-feature-card {
    background: #fff;
    border-radius: var(--pm-radius);
    padding: 2rem 1.5rem;
    height: 100%;
    border-top: 4px solid var(--pm-gold);
    box-shadow: var(--pm-shadow);
    transition: transform .2s, box-shadow .2s;
}

    .pm-feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 30px rgba(74,26,122,.2);
    }

.pm-feature-icon {
    font-size: 2rem;
    color: var(--pm-purple);
    margin-bottom: 1rem;
}

.pm-feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pm-purple-dark);
    margin-bottom: .75rem;
}

.pm-feature-text {
    color: #555;
    font-size: .95rem;
    line-height: 1.65;
    margin: 0;
}

/* ── Coming soon badge ──────────────────────────────────────────────────────── */
.pm-coming-badge {
    display: inline-block;
    background: var(--pm-gold);
    color: var(--pm-purple-dark);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .9rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.pm-coming-badge-gold {
    background: var(--pm-gold);
    color: var(--pm-purple-dark);
}

/* ── Check lists ────────────────────────────────────────────────────────────── */
.pm-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .pm-check-list li {
        padding: .4rem 0;
        color: rgba(255,255,255,.9);
        font-size: .95rem;
    }

.pm-check-list-dark li {
    color: #444;
}

/* ── Stat cards (Handler section) ───────────────────────────────────────────── */
.pm-stat-card {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(201,162,39,.35);
    border-radius: var(--pm-radius);
    padding: 1.5rem;
    text-align: center;
    height: 100%;
}

.pm-stat-icon {
    font-size: 1.8rem;
    color: var(--pm-gold-light);
    display: block;
    margin-bottom: .5rem;
}

.pm-stat-label {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    margin-bottom: .25rem;
}

.pm-stat-desc {
    color: rgba(255,255,255,.65);
    font-size: .82rem;
}

/* ── Classifieds preview pills ──────────────────────────────────────────────── */
.pm-classifieds-preview {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 2rem;
    background: #fff;
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow);
}

.pm-ad-pill {
    background: var(--pm-off-white);
    border: 2px solid var(--pm-purple);
    color: var(--pm-purple);
    border-radius: 2rem;
    padding: .5rem 1.25rem;
    font-weight: 600;
    font-size: .9rem;
}

/* ── Pricing cards ──────────────────────────────────────────────────────────── */
.pm-price-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--pm-radius);
    padding: 2rem 1.5rem;
    height: 100%;
    color: #fff;
    position: relative;
    transition: transform .2s;
}

    .pm-price-card:hover {
        transform: translateY(-4px);
    }

.pm-price-card-featured {
    background: rgba(255,255,255,.15);
    border-color: var(--pm-gold);
    border-width: 2px;
}

.pm-price-featured-label {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pm-gold);
    color: var(--pm-purple-dark);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .25rem .9rem;
    border-radius: 2rem;
    white-space: nowrap;
}

.pm-price-tier {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--pm-gold-light);
    margin-bottom: .25rem;
}

.pm-price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.pm-price-period {
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    margin-bottom: 1.5rem;
}

.pm-price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

    .pm-price-features li {
        padding: .35rem 0;
        font-size: .9rem;
        color: rgba(255,255,255,.85);
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

        .pm-price-features li::before {
            content: '✓ ';
            color: var(--pm-gold-light);
            font-weight: 700;
        }

/* ── Cards (general) ────────────────────────────────────────────────────────── */
.card {
    border: 1px solid rgba(74,26,122,.12);
    border-radius: var(--pm-radius);
    box-shadow: 0 1px 4px rgba(74,26,122,.08);
}

/* ── Animal cards ───────────────────────────────────────────────────────────── */
.animal-card:hover {
    transform: translateY(-2px);
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 6px 20px rgba(74,26,122,.15) !important;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer.bg-dark {
    background: var(--pm-purple-dark) !important;
    border-top: 3px solid var(--pm-gold);
}

/* ── Pedigree tree ──────────────────────────────────────────────────────────── */
.pedigree-cell {
    border: 1px solid #dee2e6;
    padding: .5rem .75rem;
    min-height: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

    .pedigree-cell.subject {
        background: linear-gradient(135deg, #f3eeff 0%, #e8d9ff 100%);
        border-color: var(--pm-purple);
        border-width: 2px;
        font-weight: 600;
    }

    .pedigree-cell.sire-line {
        border-left-color: var(--pm-purple);
        border-left-width: 3px;
    }

    .pedigree-cell.dam-line {
        border-left-color: var(--pm-gold);
        border-left-width: 3px;
    }

.pedigree-name {
    font-weight: 600;
    line-height: 1.2;
}

.pedigree-details {
    font-size: .75rem;
    color: #6c757d;
    line-height: 1.3;
}

/* ── Utility ────────────────────────────────────────────────────────────────── */
.btn-xs {
    padding: .125rem .375rem;
    font-size: .75rem;
    border-radius: .25rem;
}

.min-width-0 {
    min-width: 0;
}

/* ── Print ──────────────────────────────────────────────────────────────────── */
@media print {
    .navbar, footer, .btn, .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* ── Pedigree print styles ───────────────────────────────────────────────────── */

.ped-print-title {
    display: none;
}

@media print {
    /* Hide all UI chrome */
    .ped-toolbar,
    .ped-share-box,
    nav, header, footer,
    .navbar,
    .no-print,
    .btn,
    [data-bs-toggle],
    .form-check,
    .form-switch,
    .pagination,
    .alert,
    .ped-actions,
    .ped-action-link {
        display: none !important;
    }

    body {
        background: white !important;
        margin: 0;
    }

    .container-xl {
        max-width: 100% !important;
        padding: 0 !important;
    }

    main {
        padding: 0 !important;
    }

    .ped-text-grid {
        font-size: .7rem !important;
        border: 1px solid #aaa !important;
        break-inside: avoid;
    }

    .ped-cell {
        padding: .3rem .4rem !important;
        min-height: 40px !important;
    }

    .ped-print-title {
        display: block !important;
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: .5rem;
        color: #000;
    }

    @page {
        margin: 1cm;
        size: landscape;
    }
}
