.tcd-product-media,
.tcd-course-files,
.tcd-product-stats {
    direction: rtl;
    box-sizing: border-box;
}

.tcd-product-media *,
.tcd-course-files *,
.tcd-product-stats * {
    box-sizing: border-box;
}

.tcd-product-media {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #f6f7fb;
    border-radius: 8px;
}

.tcd-product-media__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tcd-product-media__placeholder {
    color: #777;
    font-size: 14px;
}

.tcd-sample-player {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: block;
    padding: 0;
    background: transparent;
    border: 0;
}

.tcd-sample-player__label {
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.tcd-sample-player__media {
    width: 100%;
    max-height: 120px;
}

.tcd-course-files {
    padding: 20px;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 8px;
}

.tcd-course-files__title {
    margin: 0 0 16px;
    font-size: 20px;
    line-height: 1.6;
    color: #111827;
}

.tcd-course-files__list {
    display: grid;
    gap: 12px;
}

.tcd-course-file {
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #eef0f3;
    border-radius: 8px;
}

.tcd-course-file__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tcd-course-file__number {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 30px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.tcd-course-file__title {
    flex: 1 1 auto;
    color: #111827;
    font-weight: 700;
    line-height: 1.7;
}

.tcd-course-file__download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.tcd-course-file__download:hover,
.tcd-course-file__download:focus {
    color: #fff;
    filter: brightness(0.94);
}

.tcd-course-file__player {
    width: 100%;
    margin-top: 12px;
    max-height: 380px;
}

.tcd-audio-player {
    --tcd-progress: 0%;
    --tcd-player-bg: linear-gradient(145deg, #191919, #252525);
    --tcd-player-text: #ffffff;
    --tcd-player-button: #c89542;
    --tcd-player-played: #d5a55e;
    --tcd-player-rest: rgba(255, 255, 255, 0.42);
    width: 100%;
    padding: 18px 22px;
    border-radius: 10px;
    background: var(--tcd-player-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--tcd-player-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    direction: ltr;
}

.tcd-audio-player__title {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.7;
    color: var(--tcd-player-text);
    direction: rtl;
}

.tcd-audio-player__timeline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    direction: ltr;
}

.tcd-audio-player__time {
    font-size: 13px;
    color: var(--tcd-player-text);
    direction: ltr;
    opacity: 0.95;
}

.tcd-audio-player__wave {
    position: relative;
    height: 64px;
    overflow: hidden;
    border-radius: 999px;
}

.tcd-audio-player__bars {
    position: absolute;
    inset: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0 8px;
    pointer-events: none;
}

.tcd-audio-player__bars span {
    width: 2px;
    height: var(--tcd-bar-height, 40%);
    min-height: 8px;
    border-radius: 999px;
    background: var(--tcd-player-rest);
    opacity: 0.78;
    transition: background-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.tcd-audio-player__bars span.is-played {
    background: var(--tcd-player-played);
    opacity: 1;
}

.tcd-audio-player__wave input {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 3;
    opacity: 0;
    cursor: pointer;
}

.tcd-audio-player__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 12px;
}

.tcd-audio-player__play,
.tcd-audio-player__skip {
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #fff;
    background: transparent;
}

.tcd-audio-player__play {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--tcd-player-button);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 22px rgba(185, 130, 50, 0.32);
}

.tcd-audio-player__skip {
    min-width: 46px;
    font-size: 18px;
    opacity: 0.9;
    direction: ltr;
}

.tcd-audio-player__skip span {
    margin: 0 2px;
    font-size: 12px;
}

.tcd-audio-player .tcd-pause-icon,
.tcd-audio-player.is-playing .tcd-play-icon {
    display: none;
}

.tcd-audio-player.is-playing .tcd-pause-icon {
    display: inline;
}

.tcd-audio-player--sample {
    padding: 13px 16px;
    border-radius: 10px;
}

.tcd-audio-player--sample .tcd-audio-player__controls {
    margin-top: 8px;
}

.tcd-audio-player--sample .tcd-audio-player__play {
    width: 42px;
    height: 42px;
    font-size: 18px;
}

.tcd-audio-player--inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.tcd-audio-player--inline .tcd-audio-player__title,
.tcd-audio-player--inline .tcd-audio-player__time,
.tcd-audio-player--inline .tcd-audio-player__skip {
    display: none;
}

.tcd-audio-player--inline .tcd-audio-player__timeline {
    flex: 1 1 auto;
    display: block;
    min-width: 0;
    order: 1;
}

.tcd-audio-player--inline .tcd-audio-player__wave {
    height: 44px;
    border-radius: 0;
}

.tcd-audio-player--inline .tcd-audio-player__bars {
    padding: 0;
}

.tcd-audio-player--inline .tcd-audio-player__bars span {
    width: 2px;
    background: var(--tcd-player-rest);
}

.tcd-audio-player--inline .tcd-audio-player__controls {
    order: 2;
    margin: 0;
    flex: 0 0 auto;
}

.tcd-audio-player--inline .tcd-audio-player__play {
    width: 34px;
    height: 34px;
    font-size: 14px;
    background: #fff;
    color: #2c83c7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.tcd-course-files__empty,
.tcd-course-files__locked {
    padding: 14px;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    line-height: 1.9;
}

.tcd-product-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tcd-product-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #111827;
    line-height: 1.5;
}

.tcd-product-stat__value {
    font-weight: 800;
}

.tcd-product-stat__label {
    color: inherit;
    opacity: 0.75;
}

.tcd-products-carousel {
    --tcd-carousel-columns: 5;
    position: relative;
    direction: rtl;
    padding: 0 54px 28px;
}

.tcd-products-carousel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tcd-products-carousel__title {
    margin: 0;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.6;
}

.tcd-products-carousel__all {
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
}

.tcd-products-carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (18px * (var(--tcd-carousel-columns) - 1))) / var(--tcd-carousel-columns));
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 0 12px;
}

.tcd-products-carousel__track::-webkit-scrollbar {
    display: none;
}

.tcd-products-carousel__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 7px 24px rgba(15, 23, 42, 0.12);
}

.tcd-products-carousel__nav--prev {
    left: 4px;
}

.tcd-products-carousel__nav--next {
    right: 4px;
}

.tcd-products-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tcd-products-carousel__dots span {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #c8bfb2;
}

.tcd-products-carousel__dots span:nth-child(2) {
    width: 7px;
    height: 7px;
    background: #9d9181;
}

.tcd-product-card {
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #edf0f3;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.tcd-product-card__media {
    position: relative;
}

.tcd-product-card__image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f1ec;
}

.tcd-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tcd-product-card__placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: #777;
}

.tcd-product-card__badge {
    position: absolute;
    top: 9px;
    right: 9px;
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f6fbf5;
    color: #14532d;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.tcd-card-audio {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 2;
    width: calc(100% - 18px);
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.tcd-card-audio__play {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: #071321;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tcd-card-audio.is-playing .tcd-card-audio__play {
    background: #d3a45c;
    color: #fff;
}

.tcd-card-audio__wave {
    height: 22px;
    opacity: 0.8;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.9) 0 2px, transparent 2px 7px);
    -webkit-mask-image: linear-gradient(0deg, transparent 0 15%, #000 15% 85%, transparent 85%);
    mask-image: linear-gradient(0deg, transparent 0 15%, #000 15% 85%, transparent 85%);
}

.tcd-product-card__body {
    padding: 14px 14px 12px;
}

.tcd-product-card__title {
    display: block;
    min-height: 44px;
    color: #273341;
    font-weight: 800;
    line-height: 1.7;
    text-decoration: none;
}

.tcd-product-card__buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
}

.tcd-product-card__price {
    color: #172033;
    font-weight: 900;
}

.tcd-product-card__price del {
    display: none;
}

.tcd-product-card__price ins {
    text-decoration: none;
}

.tcd-product-card__cart {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 8px;
    background: #071321;
    color: #fff;
}

.tcd-product-card__cart svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.tcd-product-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    direction: ltr;
}

.tcd-product-card__stars {
    color: #f8a900;
    letter-spacing: 1px;
    font-size: 15px;
}

.tcd-product-card__rating-count {
    color: #697386;
    font-size: 12px;
}

.tcd-category-grid {
    --tcd-grid-columns: 4;
    --tcd-grid-columns-mobile: 2;
    direction: rtl;
    display: grid;
    grid-template-columns: repeat(var(--tcd-grid-columns), minmax(0, 1fr));
    gap: 18px;
}

.tcd-category-grid__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.tcd-category-grid__pagination a,
.tcd-category-grid__pagination span {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #dfe3ea;
    border-radius: 8px;
    color: #172033;
    background: #fff;
    text-decoration: none;
    font-weight: 800;
}

.tcd-category-grid__pagination .current {
    background: #071321;
    border-color: #071321;
    color: #fff;
}

@media (max-width: 767px) {
    .tcd-sample-player {
        grid-template-columns: 1fr;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .tcd-sample-player__label {
        white-space: normal;
    }

    .tcd-course-file__head {
        flex-wrap: wrap;
    }

    .tcd-course-file__download {
        width: 100%;
    }

    .tcd-audio-player {
        padding: 15px;
    }

    .tcd-audio-player__timeline {
        gap: 8px;
    }

    .tcd-audio-player__controls {
        gap: 20px;
    }

    .tcd-products-carousel {
        --tcd-carousel-columns: 1.25;
        padding: 0 0 24px;
    }

    .tcd-products-carousel__nav {
        display: none;
    }

    .tcd-category-grid {
        grid-template-columns: repeat(var(--tcd-grid-columns-mobile), minmax(0, 1fr));
        gap: 12px;
    }

    .tcd-product-card__body {
        padding: 10px;
    }

    .tcd-product-card__cart {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}
