/********** Kitchen Design Wizard **********/

.kitchen-wizard-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--light) 0%, #fff 40%, var(--light) 100%);
    overflow: hidden;
    max-width: 100%;
}

.kitchen-wizard-section .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.wizard-intro {
    color: rgba(26, 22, 18, 0.65);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.9;
}

.wizard-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 1.5rem 2.25rem;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(183, 141, 101, 0.22);
    box-shadow: var(--shadow-soft);
    width: 100%;
    box-sizing: border-box;
}

/* Progress */
.wizard-progress {
    margin-bottom: 2rem;
}

.wizard-progress-track {
    height: 4px;
    background: rgba(139, 105, 20, 0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.wizard-progress-fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    transition: width 0.45s var(--transition-smooth);
}

.wizard-steps-labels {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.wizard-steps-labels li {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(26, 22, 18, 0.45);
    font-weight: 500;
    transition: color 0.3s ease;
    min-width: 0;
}

.wizard-steps-labels li.active,
.wizard-steps-labels li.done {
    color: var(--primary);
}

.wizard-steps-labels li.done {
    color: var(--primary-dark);
}

/* Panels */
.wizard-panel {
    display: none;
    animation: wizardFadeIn 0.4s ease;
}

.wizard-panel.active {
    display: block;
}

@keyframes wizardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-panel-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--dark);
}

.wizard-panel-sub {
    color: rgba(26, 22, 18, 0.6);
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

/* Selectable cards */
.wizard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.wizard-card {
    cursor: pointer;
    margin: 0;
    min-width: 0;
}

.wizard-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wizard-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem 0.85rem;
    height: 100%;
    background: #fff;
    border: 2px solid rgba(183, 141, 101, 0.18);
    transition: all 0.35s var(--transition-smooth);
    box-sizing: border-box;
}

.wizard-card:hover .wizard-card-inner {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.wizard-card input:checked + .wizard-card-inner {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(139, 105, 20, 0.06) 0%, rgba(183, 141, 101, 0.1) 100%);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-soft);
}

.wizard-card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 105, 20, 0.1);
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
    transition: all 0.3s ease;
}

.wizard-card input:checked + .wizard-card-inner .wizard-card-icon {
    background: var(--primary);
    color: #fff;
}

.wizard-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.wizard-card-desc {
    font-size: 0.8rem;
    color: rgba(26, 22, 18, 0.58);
    line-height: 1.6;
}

.wizard-step-error {
    color: #c45a3a;
    font-size: 0.85rem;
    margin: 0.75rem 0 0;
    min-height: 1.2em;
}

/* Summary & contact */
.wizard-summary {
    background: rgba(139, 105, 20, 0.06);
    border: 1px solid rgba(183, 141, 101, 0.2);
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--dark);
}

.wizard-summary strong {
    color: var(--primary-dark);
}

.wizard-input {
    background: #fff !important;
    border: 1px solid rgba(183, 141, 101, 0.25) !important;
    color: var(--dark) !important;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wizard-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 105, 20, 0.18) !important;
}

.wizard-input.is-invalid {
    border-color: #c45a3a !important;
}

.wizard-form-message {
    padding: 0.85rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    background: rgba(196, 90, 58, 0.1);
    border: 1px solid rgba(196, 90, 58, 0.3);
    color: #9a3d24;
}

.wizard-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Actions */
.wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(183, 141, 101, 0.15);
}

.btn-wizard-back {
    background: transparent;
    border: 1px solid rgba(183, 141, 101, 0.45);
    color: var(--primary-dark);
    padding: 0.65rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-wizard-back:hover:not(:disabled) {
    background: rgba(139, 105, 20, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-wizard-back:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn-wizard-next,
.btn-wizard-submit {
    margin-right: auto;
}

/* Success state */
.wizard-success {
    text-align: center;
    padding: 3rem 1.5rem;
}

.wizard-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.wizard-success h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.wizard-success p {
    color: rgba(26, 22, 18, 0.65);
}

.btn-wizard-submit .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wizardSpin 0.7s linear infinite;
    vertical-align: middle;
}

.btn-wizard-submit.loading .btn-spinner {
    display: inline-block;
}

@keyframes wizardSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .kitchen-wizard-section {
        padding: 3.5rem 0;
    }

    .wizard-shell {
        padding: 1.25rem 1rem 1.5rem;
    }

    .wizard-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .wizard-card-inner {
        flex-direction: row;
        text-align: right;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.85rem;
    }

    .wizard-card-icon {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        margin-bottom: 0;
        font-size: 1.1rem;
    }

    .wizard-card-title,
    .wizard-card-desc {
        text-align: right;
    }

    .wizard-steps-labels li {
        font-size: 0.68rem;
    }

    .wizard-actions {
        flex-direction: column;
    }

    .wizard-actions .btn {
        width: 100%;
        margin-right: 0 !important;
    }
}
