.kb-builder {
    max-width: 820px;
    margin: 0 auto;
    font-family: inherit;
    color: #222;
}

/* Прогресс */
.kb-progress {
    position: relative;
    height: 36px;
    margin-bottom: 15px;
    background: #f0f0f0;
    border-radius: 22px;
    overflow: hidden;
	width: 90%;
}
.kb-progress-bar {
    position: absolute; top: 0; left: 0; height: 100%;
    background: linear-gradient(90deg, #E40F0F, #e40f0f59);
    transition: width .3s ease;
}
.kb-progress-steps {
    position: relative;
    display: flex; justify-content: space-around;
    align-items: center; height: 100%;
    z-index: 2;
}
.kb-progress-steps span {
    width: 28px; height: 28px; border-radius: 50%;
    background: #fff; color: #888;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    transition: all .3s;
}
.kb-progress-steps span.active {
    background: #fff; color: #E40F0F;
    box-shadow: 0 0 0 3px rgba(255,92,92,.35);
}

/* Шаг */
.kb-step-title {
    text-align: center; margin: 0 0 20px; font-size: 20px;
}

.kb-empty {
    padding: 40px; text-align: center; color: #888;
}

/* Слайдер */
.kb-slider {
    position: relative;
    border-radius: 12px;
    padding: 5px 20px;
}
.kb-slider-viewport { overflow: hidden; }
.kb-slider-track {
    display: flex;
    transition: transform .35s ease;
    will-change: transform;
}
.kb-slide {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 8px;
    text-align: center;
}
.kb-slide.selected {
    background: #fff7f7;
    border-radius: 12px;
    outline: 2px solid #E40F0F;
    outline-offset: -2px;
}

.kb-slide-images {
    position: relative;
    margin-bottom: 16px;
    user-select: none;
}
.kb-slide-img {
    display: none;
    max-width: 100%;
    height: 200px !important;
    object-fit: contain;
    margin: 0 auto;
}
.kb-slide-img.active { display: block; }

.kb-img-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.4); color: #fff; border: 0;
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 18px; line-height: 1;
}
.kb-img-prev { left: 0; }
.kb-img-next { right: 0; }
.kb-img-dots {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 8px;
}
.kb-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #ccc; cursor: pointer;
}
.kb-dot.active { background: #E40F0F; }

.kb-slide-body h4 { margin: 0 0 8px; font-size: 18px; }
.kb-slide-desc {
    color: #000; font-size: 14px; margin-bottom: 12px;
    max-height: 120px; overflow: auto;
}
.kb-slide-price {
    font-size: 22px; font-weight: 700;
    margin-bottom: 12px; color: #222;
}

.kb-select-btn {
    background: #E40F0F; color: #fff; border: 0;
    padding: 10px 28px; border-radius: 8px;
    cursor: pointer; font-size: 15px;
    transition: background .2s;
}
.kb-select-btn:hover { background: #e04a4a; }

.kb-nav {
    position: absolute; top: 80%; transform: translateY(-50%);
    background: #fff; border: 1px solid #ddd;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; font-size: 22px; line-height: 1;
    color: #333; z-index: 3;
}
.kb-nav:hover { background: #f7f7f7; }
.kb-prev { left: 8px; }
.kb-next { right: 8px; }

.kb-counter {
    position: absolute; bottom: 6px; right: 16px;
    color: #999; font-size: 13px; display: none;
}

/* === Шаг 2: сетка вариантов площади === */
.kb-grid-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.kb-grid-item {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px 16px;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.kb-grid-item:hover {
    border-color: #ffbdbd;
    background: #fffafa;
}

.kb-grid-item.selected {
    border-color: #E40F0F;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(255,92,92,.15);
}

.kb-grid-name {
    font-size: 17px;
    font-weight: 600;
}

.kb-step-hint {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin: -20px 0 0px;
    font-style: italic;
}

.kb-grid-desc {
    font-size: 13px;
    color: #888;
}

/* На мобильных — в одну колонку */
@media (max-width: 480px) {
    .kb-grid-options {
        grid-template-columns: 1fr;
    }
}

/* Кнопки вперёд/назад */
.kb-actions {
    display: flex; justify-content: space-between;
    margin-top: 20px;
}
.kb-back, .kb-forward {
    padding: 10px 24px; border-radius: 8px; cursor: pointer;
    border: 1px solid #ddd; background: #fff;
    font-size: 15px;
}
.kb-back:hover { background: #f7f7f7; }
.kb-forward {
    background: #E40F0F; color: #fff; border-color: #E40F0F;
}
.kb-forward:hover:not(:disabled) { background: #e04a4a; }
.kb-forward:disabled { opacity: .4; cursor: not-allowed; }

/* Итог */
.kb-summary {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 20px;
}
.kb-summary-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border: 1px solid #eee; border-radius: 8px;
    background: #fff;
}
.kb-summary-item img {
    width: 60px; height: 60px; object-fit: contain;
    border-radius: 6px; flex-shrink: 0;
}
.kb-summary-info { flex: 1; text-align: left; }
.kb-summary-name { font-weight: 600; }
.kb-summary-price { color: #E40F0F; font-weight: 700; margin-top: 4px; }

/* === Итоговая сетка плашек (шаг 5) === */
.kb-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.kb-summary-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.kb-summary-card-img {
    background: #fafafa;
    padding: 10px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-summary-card-img img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
}

.kb-summary-card-body {
    padding: 10px 12px 14px;
}

.kb-summary-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.kb-summary-price {
    color: #E40F0F;
    font-weight: 700;
    font-size: 15px;
}

/* Планшет — 2 в ряд */
@media (max-width: 768px) {
    .kb-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Мобильный — список, 1 в ряд */
@media (max-width: 480px) {
    .kb-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .kb-summary-card {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .kb-summary-card-img {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        padding: 6px;
    }

    .kb-summary-card-img img {
        max-height: 68px;
    }

    .kb-summary-card-body {
        padding: 10px 12px;
        flex: 1;
    }
}

/* Textarea в форме */
#kb-form textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    resize: vertical;
    min-height: 70px;
}

#kb-form textarea:focus {
    outline: none;
    border-color: #E40F0F;
    box-shadow: 0 0 0 3px rgba(255,92,92,.15);
}



.kb-total {
    text-align: right; font-size: 20px;
    padding: 14px 18px; background: #f9f9f9; border-radius: 8px;
    margin-bottom: 20px;
}
.kb-total strong { color: #E40F0F; }

.kb-form-block {
    padding: 20px; background: #fff8f8;
    border-radius: 10px; border: 1px solid #ffe0e0;
    margin-bottom: 20px;
}
.kb-form-title {
    font-size: 16px; margin: 0 0 14px; text-align: center;
    font-weight: 600;
}
#kb-form input {
    width: 100%; padding: 12px 14px; margin-bottom: 10px;
    border: 1px solid #ddd; border-radius: 8px;
    box-sizing: border-box; font-size: 15px;
    background: #fff;
}
#kb-form input:focus {
    outline: none; border-color: #E40F0F;
    box-shadow: 0 0 0 3px rgba(255,92,92,.15);
}
.kb-submit {
    width: 100%; padding: 12px; background: #E40F0F;
    color: #fff; border: 0; border-radius: 8px;
    font-size: 16px; cursor: pointer; font-weight: 600;
}
.kb-submit:hover:not(:disabled) { background: #e04a4a; }
.kb-submit:disabled { opacity: .7; cursor: wait; }

.kb-success { color: #1c8c3a; padding: 12px; background: #eafaf0; border-radius: 8px; }
.kb-error   { color: #b32d2e; padding: 12px; background: #fdeaea; border-radius: 8px; }

@media (max-width: 600px) {
    .kb-slider { padding: 10px 15px; }
    .kb-slide-img { 
		height: 100px !important;
		width: 180px;
        object-fit: cover;	
	}
    .kb-slide-price { font-size: 18px; }
}