.templates-catalog {
    /* max-width: 1200px;
    margin: 0 auto; */
    padding: 30px 15px 60px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.templates-catalog__header {
    margin-bottom: 30px;
    text-align: left;
}

.templates-catalog__title {
    font-size: 32px;
    margin: 0 0 10px;
}

.templates-catalog__subtitle {
    max-width: 800px;
    color: #555;
    line-height: 1.5;
}

/* Фильтры */

.templates-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 20px;
    margin-bottom: 30px;
    background: #f7f7f9;
    border-radius: 10px;
}

.templates-filters__group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.templates-filters__label {
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
}

.templates-filters__select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d0d0dd;
    font-size: 14px;
}

/* Сетка карточек */

.templates-grid {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 3rem 2rem;
}

/* Карточка */

.template-card {
    min-width: 21rem;
    width: calc(25% - 2rem);
    height: 35rem;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.template-card__thumb {
    display: block;
    overflow: hidden;
    height: 385px;
}

.template-card__thumb img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.template-card:hover .template-card__thumb img {
    transform: scale(1.03);
}

.template-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #fff;
    background: #ff7a00;
    z-index: 2;
}

.template-card__badge--hit {
    background: #e63946;
}

.template-card__badge--new {
    background: #1d9b6c;
}

.template-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.template-card__title {
    font-size: 18px;
    margin: 0 0 6px;
}

.template-card__title a {
    color: #222;
    text-decoration: none;
}

.template-card__title a:hover {
    text-decoration: underline;
}

.template-card__subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.template-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: 14px;
    color: #444;
}

.template-card__features li {
    position: relative;
    margin-bottom: 5px;
}


.template-card__footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.template-card__price {
    display: flex;
    flex-direction: column;
}

.template-card__price-value {
    font-weight: 600;
    font-size: 20px;
}

.template-card__price-note {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

.template-card__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-card__btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.template-card__btn--primary {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    transition: all 180ms linear;
}

.template-card__btn--primary:hover {
   background: #fff;
    color: #1a73e8;
}

.template-card__btn--secondary {
    transition: all 180ms linear;
    background: #fff;
    color: #1a73e8;
    border-color: #c3d6f6;
}

.template-card__btn--secondary:hover {
    background: #1a73e8;
    color: #fff;
}

/* Блок преимуществ */

.templates-benefits {
    margin-top: 50px;
}

.templates-benefits__title {
    font-size: 24px;
    margin-bottom: 20px;
}

.templates-benefits__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.templates-benefits__item {
    background: #f7f7f9;
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 14px;
    color: #444;
}

.templates-benefits__item h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.template-card__feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.template-card__feature-icon {
    flex: 0 0 18px;
    line-height: 1.5;
}

.template-card__feature-icon svg {
    width: 18px;
    height: 18px;
}

.template-card__feature-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 130%;
}

.template-card__thumb {
    position: relative;
    overflow: hidden;
}

.template-card__thumb img,
.template-card__thumb video {
    display: block;
    width: 100%;
    height: auto;
    min-height: 234px;
    transition: opacity .2s ease;
}

.template-card__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Адаптив */
@media (max-width: 1440px) {.template-card{width: calc(33% - 2rem);}}
@media (max-width: 1240px) {
    .template-card{width: calc(35% - 2rem);}    
    .templates-grid {gap: 2rem 1rem;}
}
@media (max-width: 1070px) {.template-card{width: calc(40% - 2rem);margin-right: auto;}}
@media (max-width: 1053px) {
    
    .templates-grid {gap: 2rem 1rem;}
}
@media (max-width: 717px) {
    .template-card { margin: auto; width: calc(60% - 2rem); }
    
}    
@media (max-width: 640px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
    .templates-filters {
        flex-direction: column;
    }
    .templates-benefits__items {
        grid-template-columns: 1fr;
    }
    
}
@media (max-width: 390px) {
    .template-card {min-width: 100%;}
}