:root {
    --ksm-card-width: 262px;
    --ksm-card-min-height: 436px; /* одинаковая высота всех карточек */
    --ksm-price-font-size: 19px;
    --ksm-name-font-size: 16px;
    --ksm-sku-font-size: 13px;
    --ksm-button-width: 150px;
    --ksm-gap-title-sku: 5px;      /* расстояние между названием и артикулом */
    --ksm-gap-price-button: 9px;   /* расстояние между ценой и кнопкой */
    --ksm-gap-header-price: 0px;   /* расстояние между артикулом и блоком цены+кнопки */
}

.ksm-widget-carousel {
    background: #E14536;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    color: #fff;
}

.ksm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.ksm-logo {
    height: 40px;
    width: auto;
}

.ksm-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.ksm-carousel-wrapper {
    position: relative;
}

.ksm-carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    align-items: stretch; /* карточки одной высоты */
}

.ksm-item {
    flex: 0 0 var(--ksm-card-width);
    min-height: var(--ksm-card-min-height);
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* верх/низ */
    box-sizing: border-box;
    text-align: center;
    color: #000;
}

.ksm-header-content {
    display: flex;
    flex-direction: column;
    gap: var(--ksm-gap-title-sku);
}

.ksm-header-content h3 {
    font-size: var(--ksm-name-font-size);
    line-height: 1.3;
    margin: 0;
}

.ksm-header-content .ksm-sku {
    font-size: var(--ksm-sku-font-size);
    color: #555;
}

.ksm-price-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ksm-gap-price-button);
    margin-top: var(--ksm-gap-header-price);
}

.ksm-price-button p {
    margin: 0;
    font-weight: bold;
    font-size: var(--ksm-price-font-size);
}

.ksm-price-button a.button {
    width: var(--ksm-button-width);
    background: #0b3954;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    
    /* Добавляем эти строки для центрирования */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40px; /* Можно настроить высоту под ваш дизайн */
    line-height: 1;
}

.ksm-price-button a.button:hover {
    background: #ffb128;
    color: #FFF;
}

.ksm-carousel-wrapper {
    position: relative;
}

.ksm-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 22px;
    line-height: 36px;
    text-align: center;
}

.ksm-arrow.left {
    left: -15px;
}

.ksm-arrow.right {
    right: -15px;
}

.ksm-arrow:hover {
    background: rgba(0,0,0,0.85);
}


/* Скрываем скроллбар */
.ksm-carousel::-webkit-scrollbar { display: none; }
.ksm-carousel { -ms-overflow-style: none; scrollbar-width: none; }
