.swaper {
overflow: auto;
}
/* Стили для кнопки сравнения */
.compare-text {
    display: flex; 
    align-items: center; 
    justify-content: flex-end;
}
.compare-text .open-compare:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.compare-btn {
    position: absolute; 
    top: 1rem; 
    left: -1rem;
}
.compare-btn.active {
    background-color: #b5282a;
    color: white;
}
.compare-clean {
    justify-content: flex-end;
    margin-top: 1rem;
    cursor: pointer;
    user-select: none;
}
.compare-clean_close {
    border: 1px solid gray;
    padding: 0 0.8rem;
    border-radius: 5px;
    margin-left:1rem;
}
.compare-action {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-end;
}
/* Модальное окно сравнения */
.compare-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
}
.compare-modal-content {
    background: white;
    border-radius: 8px;
    padding: 40px 20px 20px;
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 100px;
}
.compare-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

/* Стили для слайдера сравнения */
.compare-slider-container {
    display: flex;
    width: 100%;
    position: relative;
}
.compare-params {
    flex: 0 0 200px;
    border-right: 1px solid #ddd;
}
.compare-sliders-wrapper {
    flex: 1;
    display: flex;
    width: 100%; /* Изменил с 75% на 100% */
}
.compare-slider-column {
    flex: 1;
    position: relative;
    overflow: hidden; /* Убрал border-right */
}
.compare-products-slider {
    display: flex;
    scroll-behavior: smooth;
    transition: transform 0.5s ease;
    width: 100%;
    gap: 1px; /* современный способ через gap */
}

.compare-product {
    flex: 0 0 calc(33.333%); /* учитываем отступы */
    min-width: 0; 
    box-sizing: border-box;
    border-right: 1px solid #eee;
}


/* Для 2 товаров - по 50% */
.compare-products-slider:has(.compare-product:nth-child(2):last-child) {
    justify-content: space-around;
}
.compare-products-slider:has(.compare-product:nth-child(2):last-child) .compare-product {
    flex: 0 0 49.5%; /* немного меньше 50% для отступов */
}

/* Общие стили для элементов */
.compare-product-item {
    padding: 0 10px;
    border-bottom: 1px solid #eee;
    min-height: 60px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
.compare-param-item {
    padding: 0 10px;
    border-bottom: 1px solid #eee;
    min-height: 60px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    background-color: #aa0d20;
    color: white;
    font-weight:bolder;
}
.compare-product-header,
.compare-param-header {
    position: relative;
    background-color: #aa0d20;
    color: white;
    padding: 15px;
    min-height: auto;
    font-weight:bolder;
}

/* Кнопки навигации слайдера */
.compare-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(170,13,32,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: white;
    font-size: 20px;
    border: none;
}
.compare-slider-arrow.prev {
    left: 10px;
}
.compare-slider-arrow.next {
    right: 10px;
}
.compare-slider-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Удаление из сравнения */
.remove-from-compare {
    right: 1rem;
    position: absolute;
    padding: 0rem 0.6rem;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

.compare-product-image-container {
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 210px;
    overflow: hidden;
}

.compare-param-image {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    background-color: #aa0d20;
    color: white;
    font-weight: bolder;
    height: 210px;
    box-sizing: border-box;
}

.compare-product-image-container img {
    max-height: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
}