.tm-testimonials {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    padding: 40px 0;
    overflow: hidden;
}

/* --- Header (left side) --- */

.tm-testimonials__header {
    flex: 0 0 300px;
    padding-top: 20px;
    padding-left: 50px;
}

.tm-testimonials__header h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    color: #1a1a1a;
}

/* --- Social proof stats --- */

.tm-testimonials__stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

.tm-testimonials__stat {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* --- Body (right side: carousel + pagination) --- */

.tm-testimonials__body {
    flex: 1;
    min-width: 0;
}

/* --- Carousel (native scroll-snap) --- */

.tm-testimonials__carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.tm-testimonials__carousel::-webkit-scrollbar {
    display: none;
}

.tm-testimonials__track {
    display: flex;
    gap: var(--tm-track-gap, 20px);
}

/* --- Card --- */

.tm-testimonials__card {
    flex: 0 0 calc((100% - var(--tm-track-gap, 20px) * (var(--tm-columns) - 1)) / var(--tm-columns));
    scroll-snap-align: start;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    box-sizing: border-box;
}

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

.tm-card__author {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-card__verified {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.tm-card__verified svg {
    flex-shrink: 0;
    color: #22c55e;
}


/* --- Stars (WooCommerce star-rating) --- */

.tm-testimonials__card .product-rating {
    margin-bottom: 12px;
}

.tm-testimonials__card .product-rating .star-rating {
    font-size: 14px;
}

/* --- Review text --- */

.tm-card__text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    flex-grow: 1;
}

/* --- Date --- */

.tm-card__date {
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

/* --- Pagination --- */

.tm-testimonials__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.tm-pagination__prev,
.tm-pagination__next {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #333;
    padding: 10px 14px;
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.tm-pagination__prev:hover,
.tm-pagination__next:hover {
    color: #000;
}

.tm-pagination__prev:disabled,
.tm-pagination__next:disabled {
    color: #ccc;
    cursor: default;
}

.tm-pagination__status {
    font-size: 14px;
    color: #666;
}

/* --- CTA --- */

.tm-testimonials__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    text-align: center;
}

.tm-cta__heading {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.tm-cta__button {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.tm-cta__button:hover {
    background: #333;
    color: #fff;
}

/* --- Responsive --- */

@media (max-width: 1024px) {
    .tm-testimonials {
        flex-direction: column;
        gap: 24px;
        padding: 30px 0;
        --tm-columns: 3 !important;
    }

    .tm-testimonials__header {
        flex: none;
        padding-top: 0;
        padding-left: 20px;
    }

    .tm-testimonials__header h2 {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .tm-testimonials {
        --tm-columns: 2 !important;
    }
}

@media (max-width: 640px) {
    .tm-testimonials {
        --tm-columns: 1 !important;
        padding: 20px 0;
        margin-left: 15px;
        overflow: hidden;
    }

    .tm-testimonials__header {
        padding-left: 0;
    }

    .tm-testimonials__header h2 {
        font-size: 22px;
    }

    .tm-testimonials__track {
        --tm-track-gap: 12px;
    }

    .tm-testimonials__card {
        flex: 0 0 10%;
        max-width: none;
        padding: 20px;
        min-height: auto;
        height: 280px;
    }

    .tm-testimonials__pagination {
        gap: 12px;
        justify-content: flex-start;
    }

    .tm-testimonials__cta {
        margin-top: 20px;
        align-items: flex-start;
        text-align: left;
    }

    .tm-cta__button {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .tm-testimonials__card {
        max-width: 330px !important;
    }
}
