.course-bundles {
    --bundle-accent: #a78bfa;
    --bundle-accent-strong: #c4b5fd;
    margin: 3rem 0;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), var(--bg-secondary));
}

.course-bundles__header {
    margin-bottom: 1.5rem;
}

.course-bundles__eyebrow {
    margin: 0 0 .4rem;
    color: var(--bundle-accent-strong);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.course-bundles__header h2 {
    margin: 0 0 .5rem;
    color: var(--text-primary);
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.course-bundles__header > p:last-child {
    margin: 0;
    color: var(--text-secondary);
}

.course-bundles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.catalog-bundles {
    margin: 2rem 0 2.5rem;
}

.catalog-bundles--featured {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.catalog-bundles--featured .course-bundles__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.catalog-discovery__metric--bundle {
    background: rgba(167, 139, 250, 0.1) !important;
    border-color: rgba(167, 139, 250, 0.32);
}

.catalog-discovery__metric--bundle .catalog-discovery__metric-value {
    color: #c4b5fd !important;
}

.catalog-bundles .catalog-btn--primary {
    background: linear-gradient(135deg, var(--bundle-accent-strong), var(--bundle-accent)) !important;
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.24);
    color: #171126 !important;
}

.catalog-bundles .catalog-btn--primary:hover {
    box-shadow: 0 8px 22px rgba(167, 139, 250, 0.34);
}

.catalog-bundles .catalog-btn--primary i {
    color: #171126 !important;
}

.catalog-bundles--featured .bundle-offer__footer .catalog-btn--primary {
    flex: 0 0 auto;
    width: auto;
    min-width: 132px;
    min-height: 42px;
    padding: 0.62rem 0.9rem;
    font-size: 0.78rem;
}

.catalog-bundle-courses {
    display: grid;
    gap: .35rem;
    margin: 0 0 .8rem;
    padding: 0;
    list-style: none;
    color: var(--text-secondary);
    font-size: .82rem;
}

.catalog-bundle-courses li {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
}

.catalog-bundle-courses i {
    flex: 0 0 auto;
    color: var(--bundle-accent);
}

.catalog-bundle-courses__more {
    font-weight: 700;
}

.bundle-offer {
    position: relative;
    display: flex;
    gap: 1rem;
    overflow: hidden;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(167, 139, 250, 0.08), var(--bg-secondary, #161616));
    color: var(--text-primary);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bundle-offer:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.58);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

.bundle-offer__ribbon {
    position: absolute;
    top: 12px;
    right: -29px;
    padding: .25rem 2rem;
    transform: rotate(35deg);
    background: var(--bundle-accent);
    color: #171126;
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bundle-offer__icon {
    display: grid;
    flex: 0 0 48px;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(167, 139, 250, .16);
    color: var(--bundle-accent-strong);
    font-size: 1.35rem;
}

.bundle-offer__content {
    min-width: 0;
    flex: 1;
}

.bundle-offer h3 {
    margin: 0 2rem .4rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.bundle-offer p {
    margin: 0 0 .8rem;
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.5;
}

.bundle-offer__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    color: var(--text-secondary);
    font-size: .78rem;
}

.bundle-offer__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
}

.bundle-offer__footer strong {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.bundle-offer__footer s {
    margin-left: .35rem;
    color: var(--text-secondary);
    font-size: .8rem;
}

.bundle-offer__footer .cd-primary-btn {
    padding: .65rem .85rem;
    font-size: .78rem;
}

@media (max-width: 760px) {
    .bundle-offer {
        display: block;
    }

    .bundle-offer__icon {
        margin-bottom: 0.85rem;
    }

    .catalog-bundles--featured .bundle-offer__footer .catalog-btn--primary {
        min-width: 118px;
    }
}

/* ── Bundle detail page ───────────────────────────────────── */
.bundle-detail-page.course-bundles {
    margin: 0;
    padding: 2rem 0 5rem;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 88% 8%, rgba(167, 139, 250, 0.16), transparent 30rem),
        var(--bg-primary);
}

.bundle-detail-page > .container {
    max-width: 1180px;
    padding: 0 1.25rem;
}

.bundle-detail__breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.35rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.bundle-detail__breadcrumb-link,
.bundle-detail__breadcrumb-current {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.bundle-detail__breadcrumb-link {
    color: var(--bundle-accent-strong) !important;
    text-decoration: none !important;
}

.bundle-detail__breadcrumb-link:hover {
    color: #ddd6fe !important;
}

.bundle-detail__breadcrumb-sep {
    color: var(--text-secondary);
    opacity: 0.7;
}

.bundle-detail__hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 3.25rem);
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(167, 139, 250, 0.13), transparent 42%),
        rgba(12, 10, 20, 0.88);
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.28);
}

.bundle-detail__hero::after {
    content: '✦';
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: rgba(196, 181, 253, 0.22);
    font-size: 4rem;
    pointer-events: none;
}

.bundle-detail__hero-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.bundle-detail__hero h1 {
    max-width: 720px;
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.bundle-detail__description {
    max-width: 650px;
    margin: 0;
    color: var(--text-secondary);
    font-size: clamp(0.98rem, 1.6vw, 1.1rem);
    line-height: 1.7;
}

.bundle-detail__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.6rem 0 0;
    padding: 0;
    list-style: none;
}

.bundle-detail__facts li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 999px;
    background: rgba(167, 139, 250, 0.08);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.bundle-detail__facts i {
    color: var(--bundle-accent-strong);
}

.bundle-detail__purchase {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 1.35rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 20px;
    background: rgba(7, 6, 12, 0.62);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.bundle-detail__purchase-label {
    margin: 0 0 0.65rem;
    color: var(--bundle-accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bundle-detail__price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.bundle-detail__price-row strong {
    color: var(--text-primary);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: -0.04em;
}

.bundle-detail__price-row s {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.bundle-detail__saving {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.45rem 0 1.1rem;
    color: #86efac;
    font-size: 0.82rem;
    font-weight: 800;
}

.bundle-detail__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    gap: 0.55rem;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bundle-accent-strong), var(--bundle-accent));
    box-shadow: 0 10px 24px rgba(167, 139, 250, 0.25);
    color: #171126 !important;
    font-size: 0.92rem;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bundle-detail__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(167, 139, 250, 0.38);
    color: #171126 !important;
}

.bundle-detail__cta i {
    color: #171126 !important;
}

.bundle-detail__cta--owned {
    background: rgba(34, 197, 94, 0.16);
    box-shadow: none;
    color: #86efac !important;
}

.bundle-detail__cta--owned i {
    color: #86efac !important;
}

.bundle-detail__purchase-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0.85rem 0 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.45;
}

.bundle-detail__purchase-note i {
    color: #86efac;
}

.bundle-detail__included {
    margin: 2.25rem 0 0;
    padding: clamp(1.25rem, 3vw, 2.25rem);
}

.bundle-detail__included .course-bundles__header {
    margin-bottom: 1.5rem;
}

.bundle-detail__included .course-bundles__header h2 {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.bundle-detail__included .course-bundles__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.bundle-detail__included .bundle-offer {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1rem;
}

.bundle-detail__included .bundle-offer__icon {
    flex: 0 0 auto;
}

.bundle-detail__included .bundle-offer__content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bundle-detail__included .bundle-offer h3 {
    min-height: 3.2em;
    margin-right: 0;
    font-size: 0.98rem;
    line-height: 1.3;
}

.bundle-detail__included .bundle-offer p {
    flex: 1;
    font-size: 0.8rem;
}

.bundle-detail__included .bundle-offer__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(167, 139, 250, 0.16);
}

.bundle-offer__footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.3;
}

.bundle-offer__footer-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.bundle-offer__footer-meta i {
    color: var(--bundle-accent-strong);
}

.bundle-detail__course-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 11px;
    background: rgba(167, 139, 250, 0.1);
    color: var(--bundle-accent-strong) !important;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.bundle-detail__course-link:hover {
    transform: translateY(-1px);
    border-color: rgba(167, 139, 250, 0.65);
    background: rgba(167, 139, 250, 0.18);
    color: #ede9fe !important;
}

.bundle-detail__course-link i {
    color: inherit !important;
}

[data-theme="light"] .bundle-detail-page.course-bundles {
    background:
        radial-gradient(circle at 88% 8%, rgba(167, 139, 250, 0.18), transparent 30rem),
        var(--bg-primary);
}

[data-theme="light"] .bundle-detail__hero {
    background:
        linear-gradient(135deg, rgba(167, 139, 250, 0.13), transparent 42%),
        #ffffff;
}

[data-theme="light"] .bundle-detail__purchase {
    background: rgba(248, 250, 252, 0.92);
}

@media (max-width: 1100px) {
    .bundle-detail__hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    }

    .bundle-detail__included .course-bundles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .bundle-detail-page.course-bundles {
        padding-top: 1.25rem;
    }

    .bundle-detail__hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.35rem;
        border-radius: 20px;
    }

    .bundle-detail__hero h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .bundle-detail__hero::after {
        right: 1rem;
        font-size: 2.75rem;
    }

    .bundle-detail__included {
        padding: 1rem;
        border-radius: 20px;
    }

    .bundle-detail__included .course-bundles__grid {
        grid-template-columns: 1fr;
    }

}

