/* KONFIGURATOR BUDY DLA PSA - niezależny od reszty strony */

.konfigurator-budy {
    --kb-main: #c22361;
    --kb-dark: #3d2a33;
    --kb-green: #2dc703;
    --kb-light: #f7f7f7;
    --kb-border: #e5e5e5;
    margin: 0 auto;
    color: #444;
}

.konfigurator-budy *, .konfigurator-budy *:before, .konfigurator-budy *:after {
    box-sizing: border-box;
}

.kb-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 2.5em;
    gap: .75em;
}

.kb-progress-step {
    display: flex;
    align-items: center;
    gap: .5em;
    color: #aaa;
    font-weight: 700;
    white-space: nowrap;
}

.kb-progress-step span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kb-progress-step.active {
    color: var(--kb-main);
}

.kb-progress-step.active span {
    background: var(--kb-main);
    border-color: var(--kb-main);
    color: #fff;
}

.kb-progress-line {
    height: 2px;
    width: 50px;
    background: #ddd;
}

.kb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr);
    gap: 2em;
    align-items: start;
}

.kb-options, .kb-preview-panel, .kb-order, .kb-summary-details, .kb-summary-preview {
    background: #fff;
    border: 1px solid var(--kb-border);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,.05);
}

.kb-options {
    padding: 1.4em;
}

.kb-section {
    padding: 1.25em 0;
    border-bottom: 1px solid #eee;
}

.kb-section:first-child { padding-top: 0; }
.kb-section:last-child { border-bottom: 0; padding-bottom: 0; }

.kb-section h3 {
    margin: 0 0 .45em;
    color: var(--kb-main);
    font-size: 1.05em;
}

.kb-section h3 span {
    display: inline-flex;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: var(--kb-main);
    color: white;
    margin-right: .45em;
    font-size: .85em;
}

.kb-help, .kb-summary-intro {
    margin-top: 0;
    color: #777;
    font-size: .9em;
}

.kb-radio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .75em;
}

.kb-color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: .75em;
}

.kb-stack {
    display: grid;
    gap: .65em;
}

.kb-choice {
    display: block;
    cursor: pointer;
}

.kb-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kb-choice-content {
    display: flex;
    flex-direction: column;
    min-height: 88px;
    justify-content: center;
    padding: .85em 1em;
    border: 2px solid #e3e3e3;
    border-radius: 8px;
    background: #fff;
    transition: .2s ease;
}

.kb-small-choice .kb-choice-content {
    min-height: 62px;
    text-align: center;
    align-items: center;
}

.kb-choice-content strong {
    color: #333;
    line-height: 1.3;
}

.kb-choice-content small {
    color: #777;
    margin-top: .2em;
    line-height: 1.3;
}

.kb-choice-content b {
    color: var(--kb-main);
    margin-top: .15em;
    font-size: 1.05em;
}

.kb-old-price {
    color: #999;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    font-size: .9em;
    line-height: 1.2;
    margin-top: .3em;
}

.kb-choice input:checked + .kb-choice-content {
    border-color: var(--kb-main);
    box-shadow: 0 0 0 3px rgba(194,35,97,.12);
    background: #fff8fb;
}

.kb-choice:hover .kb-choice-content {
    border-color: #d99ab4;
}

.kb-section select {
    width: 100%;
    height: 3em;
    padding: 0 .8em;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    color: #444;
}

.kb-toggle-choice {
    display: flex;
    gap: .8em;
    align-items: center;
    padding: .85em 0;
    cursor: pointer;
    border-bottom: 1px dashed #e8e8e8;
}

.kb-toggle-choice:last-child { border-bottom: 0; }

.kb-toggle-choice input {
    width: 21px;
    height: 21px;
    accent-color: var(--kb-main);
    flex: 0 0 auto;
}

.kb-toggle-choice span {
    display: flex;
    flex: 1;
    justify-content: space-between;
    gap: 1em;
}

.kb-toggle-choice strong { color: #444; }
.kb-toggle-choice small { color: var(--kb-main); font-weight: 700; }

.kb-preview-panel {
    padding: 1.1em;
}

.kb-sticky {
    position: sticky;
    top: 20px;
}

.kb-sticky > h3 {
    text-align: center;
    color: var(--kb-main);
    margin: 0 0 .7em;
}

.kb-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(145deg, #fafafa, #f1f1f1);
}

.kb-layer {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

.kb-preview-empty {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7em;
    color: #999;
}

.kb-preview-empty i {
    font-size: 3em;
    color: #ddd;
}

.kb-price-card {
    margin-top: 1em;
    padding: 1em;
    text-align: center;
    background: var(--kb-main);
    color: #fff;
    border-radius: 8px;
}

.kb-price-card span, .kb-price-card small {
    display: block;
}

.kb-price-card strong {
    display: block;
    font-size: 2em;
    line-height: 1.15;
    margin: .1em 0;
}

.kb-mini-summary {
    margin: 1em 0 0;
    padding: 0;
    list-style: none;
    font-size: .85em;
}

.kb-mini-summary li {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    padding: .45em 0;
    border-bottom: 1px solid #eee;
}

.kb-mini-summary strong { color: #555; }

.kb-actions {
    margin-top: 2em;
    text-align: center;
}

.kb-actions .button {
    min-width: 260px;
}

.kb-actions-split {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    flex-wrap: wrap;
}

.kb-actions-split .button {
    flex: 1;
}

.kb-step { display: none; }
.kb-step.active { display: block; }

.kb-summary-page {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(320px,.9fr);
    gap: 1.5em;
    align-items: stretch;
}

.kb-summary-preview, .kb-summary-details, .kb-order {
    padding: 1.5em;
}

.kb-summary-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-preview-large {
    max-width: 700px;
}

.kb-summary-details h2, .kb-order h2 {
    color: var(--kb-main);
    margin-top: 0;
}

.kb-summary-list {
    border-top: 1px solid #eee;
}

.kb-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    padding: .7em 0;
    border-bottom: 1px solid #eee;
}

.kb-summary-row span:first-child { color: #777; }
.kb-summary-row span:last-child { text-align: right; font-weight: 700; color: #444; }

.kb-total {
    margin-top: 1.4em;
    padding: 1em;
    background: #fff4f8;
    border-left: 5px solid var(--kb-main);
}

.kb-total span, .kb-total small {
    display: block;
}

.kb-total strong {
    display: block;
    color: var(--kb-main);
    font-size: 2.2em;
    line-height: 1.1;
}

.kb-total small { color: #777; margin-top: .4em; }

.kb-order label {
    display: block;
    font-weight: 700;
    margin-bottom: .35em;
    color: #555;
}

.kb-order input[type="text"],
.kb-order input[type="email"],
.kb-order input[type="tel"],
.kb-order textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 7px;
    padding: .7em .8em;
}

.kb-consent {
    display: flex !important;
    align-items: flex-start;
    gap: .7em;
    padding: .8em 0;
    font-weight: 400 !important;
    font-size: .9em;
}

.kb-consent input {
    margin-top: .25em;
    accent-color: var(--kb-main);
}

.kb-final-box {
    margin-top: 1.5em;
    padding: 1.25em 1.5em;
    background: var(--kb-dark);
    color: #fff;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
}

.kb-final-box span, .kb-final-box small {
    display: block;
}

.kb-final-box strong {
    display: block;
    font-size: 2em;
    line-height: 1.1;
}

.kb-final-box small { color: #ddd; }

.kb-final-box .button {
    margin: 0;
    white-space: nowrap;
}

@media screen and (max-width: 980px) {
    .kb-layout, .kb-summary-page {
        grid-template-columns: 1fr;
    }

    .kb-preview-panel { order: -1; }
    .kb-sticky { position: static; }

    .kb-preview {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 736px) {
    .kb-progress {
        gap: .25em;
        margin-bottom: 1.5em;
    }

    .kb-progress-step {
        font-size: .72em;
        flex-direction: column;
        gap: .2em;
        text-align: center;
    }

    .kb-progress-step span {
        width: 29px;
        height: 29px;
    }

    .kb-progress-line {
        flex: 1;
        width: auto;
        min-width: 10px;
    }

    .kb-options, .kb-preview-panel, .kb-summary-preview, .kb-summary-details, .kb-order {
        padding: 1em;
    }

    .kb-radio-grid {
        grid-template-columns: 1fr;
    }

    .kb-color-grid {
        grid-template-columns: 1fr;
    }

    .kb-toggle-choice span {
        flex-direction: column;
        gap: .15em;
    }

    .kb-actions-split, .kb-final-box {
        flex-direction: column;
    }

    .kb-actions .button,
    .kb-actions-split .button,
    .kb-final-box .button {
        width: 100%;
        min-width: 0;
    }

    .kb-final-box {
        align-items: stretch;
        text-align: center;
    }

    .kb-summary-row {
        flex-direction: column;
        gap: .15em;
    }

    .kb-summary-row span:last-child {
        text-align: left;
    }
}


/* PROMOCJA I NAJNIŻSZA CENA Z 30 DNI */
.kb-choice-content .kb-promo-badge {
    display: inline-block;
    align-self: flex-start;
    margin-top: .45em;
    padding: .22em .55em;
    border-radius: 5px;
    background: #e30613;
    color: #fff;
    font-size: .82em;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1.2;
}

.kb-choice-content .kb-old-price {
    font-size: 1em;
    color: #777;
    margin-top: .35em;
}

.kb-choice-content > b {
    display: block;
    color: #e30613;
    font-size: 1.7em;
    font-weight: 900;
    line-height: 1.05;
    margin-top: .08em;
}

.kb-choice-content .kb-lowest-price {
    display: block;
    margin-top: .45em;
    color: #555;
    font-size: .72em;
    font-style: normal;
    font-weight: 600;
    line-height: 1.25;
}

.kb-price-card .kb-price-promo-label {
    display: block;
    font-size: .95em;
    font-weight: 900;
    color: #fff;
    margin-bottom: .25em;
}

.kb-price-card small {
    line-height: 1.35;
}

.kb-price-card small b {
    font-weight: 800;
}

@media screen and (max-width: 736px) {
    .kb-choice-content > b {
        font-size: 1.8em;
    }
}


/* Dyskretna informacja o charakterze wizualizacji */
.kb-visual-note {
    margin: 8px 10px 0;
    font-size: 11px;
    line-height: 1.35;
    color: #777;
    text-align: center;
}
.kb-visual-note-summary { margin-top: 6px; }
