.catalog-page {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.catalog-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
}

html[data-theme="light"] .catalog-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.catalog-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.catalog-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: inherit;
}

.catalog-brand__mark {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #fff;
    font-weight: 800;
}

.catalog-brand strong {
    display: block;
    font-size: .95rem;
}

.catalog-brand small {
    display: block;
    font-size: .72rem;
    opacity: .65;
}

.catalog-header__nav {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
}

.catalog-header__nav a {
    color: inherit;
    text-decoration: none;
    font-size: .88rem;
    opacity: .85;
}

.catalog-header__nav a:hover {
    opacity: 1;
}

.catalog-header__cta {
    padding: .35rem .85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #fff !important;
    opacity: 1 !important;
}

.catalog-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.catalog-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    margin-bottom: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, color-mix(in srgb, var(--track-accent) 16%, transparent), transparent);
}

html[data-theme="light"] .catalog-hero {
    border-color: rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, color-mix(in srgb, var(--track-accent) 10%, #fff), #fff);
}

.catalog-hero__icon {
    width: 3rem;
    height: 3rem;
    border-radius: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: color-mix(in srgb, var(--track-accent) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--track-accent) 35%, transparent);
    flex-shrink: 0;
}

.catalog-hero h1 {
    margin: 0 0 .25rem;
    font-size: 1.45rem;
    font-weight: 800;
}

.catalog-hero__sub {
    margin: 0;
    font-size: .9rem;
    opacity: .75;
}

.catalog-section {
    margin-bottom: 2.25rem;
}

.catalog-section__title {
    margin: 0 0 .35rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.catalog-section__desc {
    margin: 0 0 1rem;
    font-size: .88rem;
    opacity: .7;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    border-radius: .85rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, border-color .15s;
}

html[data-theme="light"] .catalog-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

.catalog-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--track-accent, #6366f1) 45%, transparent);
}

.catalog-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.catalog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-card__media--folder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.08));
}

.catalog-card__folder-badge {
    position: absolute;
    inset: auto auto .5rem .5rem;
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.catalog-card__play {
    position: absolute;
    inset: auto auto .45rem .45rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
}

.catalog-card__body {
    padding: .9rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-card__body h3 {
    margin: 0 0 .4rem;
    font-size: .98rem;
    font-weight: 700;
}

.catalog-card__body p {
    margin: 0 0 .5rem;
    font-size: .82rem;
    opacity: .75;
    flex: 1;
}

.catalog-card__levels {
    font-size: .78rem !important;
    color: color-mix(in srgb, var(--track-accent, #6366f1) 80%, inherit);
}

.catalog-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: auto;
}

.catalog-card__price {
    font-weight: 800;
    font-size: .88rem;
}

.catalog-card__price--free {
    color: #22c55e;
}

.catalog-card__sessions {
    font-size: .78rem;
    opacity: .65;
}

.catalog-card__link {
    display: inline-block;
    margin-top: .35rem;
    font-size: .82rem;
    font-weight: 700;
    color: #818cf8;
}

.catalog-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: .8;
}

.catalog-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2rem;
    text-align: center;
}

.catalog-footer a {
    color: inherit;
    opacity: .7;
    text-decoration: none;
    font-size: .88rem;
}

.catalog-footer a:hover {
    opacity: 1;
}

@media (max-width: 640px) {
    .catalog-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .catalog-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}
