/* таблица сравнения моделей в статьях (comparison-wrapper, js/new2024/common.js comparisonTable) — вынесено из all.css,
   подключается и в старом шаблоне (после all.css), и на страницах блога */
.comparison-wrapper {
    position: relative;
    --feature-col-width: 187px;
    position: relative;
    --product-col-width: 180px;
}

.comparison-controls {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 46%;
    z-index: 9999;
    width: 100%;
    align-items: center;
    margin-bottom: 10px;
}

.comparison-arrow {
    background: #fff;
    color: black;

    padding: 17px 18px;
    opacity: 0.9;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background 0.3s;
}
.comparison-arrow:disabled{
    visibility: hidden;
}
.comparison-arrow:hover {
    background: gainsboro;
}

.comparison-arrow:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.comparison__header {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    z-index: 100;
    background: #fff;
    width: 100%;
}




.comparison__section-title:after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 1px;
    left: 210px;
    /*left: calc(100% - var(--product-col-width) * var(--product-col-count));*/
    background: #B5B5B5;
}


.comparison__products-viewport {
    overflow: hidden;
    flex: 1;
}

.comparison__products-track {
    display: grid;
    grid-template-columns: repeat(20, var(--product-col-width));
    width: max-content;
    transition: transform 0.3s ease;
}

.comparison {
    overflow-x: hidden;
    position: relative;
}

.comparison__content {
    display: flex;
    flex-direction: column;
}

.comparison__cell {
    padding: 10px 12px;

    text-align: center;
    min-width: 0;
}

.comparison__cell--feature {
    text-align: left;
    background: #f5f5f5;
    font-weight: 500;
    width: var(--feature-col-width);
    flex: 0 0 var(--feature-col-width);
}

.comparison__row {
    display: flex;
    align-items: stretch;
}

.comparison__section-title {
    padding: 10px 12px;
    background: #ddd;
    font-weight: 600;
    width: 100%;
    display: block;

    position: sticky;
    top: 0;
    z-index: 50;
    transition: transform 0.3s ease;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-btn {
    background: #e53935;
    color: #fff;
    text-align: center;
    padding: 6px;
    border-radius: 4px;
    text-decoration: none;
}
.comparison-wrapper {
    width: 880px;
    overflow: hidden;
    height: 100%;
}
.comparison__section-title {
    font-size: 14px;
    font-weight: 600;
}
.comparison__cell.comparison__cell--feature{
    font-size: 14px;
}
.comparison__content .comparison__products-track > .comparison__cell {
    font-size: 16px;
    padding: 10px;

}
.comparison__content .comparison__products-track > .comparison__cell:first-child{

}
.comparison__section-title {

}
.comparison__cell.comparison__cell--feature {
    background: #3F3F3F;
    color: #FFFFFF;
}
.comparison__section-title {
    background: #EDEDED;

}

.comparison__cell--product .product-btn{
    padding: 11px 0px 8px;
    font-size: 14px;
    font-weight: 600;
}


.comparison__cell--product .product-title {
    height: 30px;
    font-weight: 600;
    font-size: 14px;
    line-height: 14px;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-align: left;
}

.score-1 {
    background: #58BC8A;
}
.score-2{
    background: #9BC57B;
}
.score-3{
    background: #DDD16F;
}
.score-4 {
    background: #FCCA67;
}
.score-5{
    background: #F4AF6A;
}

.comparison__cell.comparison__cell--feature.score-all {
    background: #EDEDED;
    color: #282828;
    font-weight: 600;
    font-size: 16px;

}
.score-bal {
    color: #282828;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
}
.comparison__products-track.desc-score-all {
    background: #EDEDED;
}
.desc-score-bal {
    font-weight: 600;
}
@media (min-width: 601px){
    .comparison__products-track {
        height: 100%;
    }

    .comparison__products-track .comparison__cell {
        align-items: center;
        display: flex;
        justify-content: center;
    }
}




/* borders */


.comparison__row {
    border-bottom: 1px solid #B5B5B5;
}
.comparison__section-title {
    border-bottom: 1px solid #B5B5B5;
}
.comparison-wrapper {
    border: 1px solid #B5B5B5;
    border-radius: 10px;
    margin: 20px 0;
}

.comparison__cell.comparison__cell--product {
    border-right: 1px solid #B5B5B5;
    border-bottom: 1px solid #B5B5B5;
}

.comparison__cell {
    border-right: 1px solid #B5B5B5;
}
.comparison__cell:last-child {
    border-right: none;
}
.comparison__section-title.mob{
    display: none;
}
@media (max-width: 800px){

    .comparison-wrapper{
        width: 100%;
    }
    .comparison__cell.comparison__cell--feature {
        display: none;
    }
}


@media (max-width: 600px){


    .comparison__content{

    }
    .comparison__section-title:after{
        content: none;
    }
    .comparison__section-title{
        text-align: center;
    }
    a.product-btn {
        margin-top: 8px;
    }
    .comparison__cell.comparison__cell--product:first-child {

    }
    .comparison__section-title.mob{
        display: block;
    }
    .comparison__section-title.mob {
        border: none;
        background: none;
        font-weight: 400;
    }
    .comparison-controls{
        display: none;
        position: absolute;
        top: 21%;
        right: 12px;
        width: 92%;
    }
    .comparison__cell.comparison__cell--product{
        border-bottom: none;
    }
    .comparison-arrow {
        padding: 10px 12px;
    }
}

.comparison__cell--product .product-title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison__section-title.mob {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}
