:root {
    --brand-green: #417D83;
    --brand-orange: #FF0000;
    --brand-primary: #192324;
}


#calculator {
    background-image: url('../images/calculatorBG.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 75vh;
    padding: 32px 0;
}

/* ==========================================================================
1. MULTI-STEP PROGRESS BAR & UTILITIES
========================================================================== */
.progressbar {
    display: flex;
    justify-content: space-between;
    counter-reset: step;
    margin-bottom: 40px;
    position: relative;
    width: 90%;
    margin-left: 8px;
}

.progressbar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background-color: #d3d3d3;
    z-index: 0;
}

.progress-step {
    width: 20px;
    height: 20px;
    background-color: #d3d3d3;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    position: relative;
    transition: 0.3s;
}

.progress-step::before {
    counter-increment: step;
    content: counter(step);
    color: white;
    font-size: 12px;
}

.progress-step.active {
    background-color: var(--brand-green);
    box-shadow: 0 0 0 6px rgba(65, 125, 131, 0.2);
    transform: scale(1.1);
}

.progress-step::after {
    content: attr(data-title);
    position: absolute;
    top: 30px;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    left: -8px;
}

/* Helper Classes */
.text-brandGreen {
    color: var(--brand-green);
}

.text-brandPrimary {
    color: var(--brand-primary);
}

.bg-brandGreen {
    background-color: var(--brand-green);
}

.bg-brandOrange {
    background-color: var(--brand-orange);
}

.border-brandGreen {
    border: 1px solid var(--brand-green);
}

/* ==========================================================================
2. FORM STEP LOGIC & NAVIGATION BUTTONS
========================================================================== */
.form-step {
    display: none;
    animation: fade 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btns-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Main Next/Prev Buttons */
button.btn-next,
button.btn-prev {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

button.btn-next {
    background-color: var(--brand-orange);
    color: white;
    border-radius: 0;
    border: none;
}

button.btn-prev {
    background-color: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    border-radius: 0;
}

/* ==========================================================================
3. PROPERTY & LOCATION SELECTION (STEP 1)
========================================================================== */
.option-buttons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
}

.option {
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    width: 300px;
    position: relative;
    border: 1px solid var(--brand-green);
    color: var(--brand-green);
    display: block;
}

/* Radio Logic for Selection */
input[type="radio"].d-none:checked+.option {
    background-color: var(--brand-green);
    color: white;
}

.option:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 50%;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.05);
}

input[type="radio"]:checked+.option:after {
    background-color: rgba(256, 256, 256, 0.05);
}

input[type="radio"]:checked+.option:before {
    content: '';
    position: absolute;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border: 1px solid white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
4. ROOM ADDITION UI (STEP 2)
========================================================================== */
.room-add-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-room-add {
    width: 218px;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: 0.2s;
}

.btn-room-add:hover {
    background-color: #e9ecef;
}

.add-room {
    background: none !important;
    border: none;
    color: black;
    font-weight: 500;
}

/* ==========================================================================
5. ROOM BLOCK & CONTENT TEMPLATES
========================================================================== */
.room-block {
    border: 1px solid #ddd;
    margin-bottom: 20px;
    background: #fafafa;
    position: relative;
}

.room-title {
    background-color: var(--brand-green);
    padding: 16px;
    color: white;
    margin-bottom: 0;
}

.room-content {
    padding: 20px;
}

/* Template Action Buttons */
.remove-btn,
.collapse-btn {
    position: absolute;
    top: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.remove-btn {
    right: 10px;
    color: white;
    font-size: 20px;
}

.collapse-btn {
    right: 40px;
    color: white;
    font-size: 14px;
}

/* Dynamic material/material section */
.option-section {
    padding: 15px;
    margin-top: 15px;
    background: #fff;
    border: 1px solid #eee;
    max-height: 400px;
    overflow-y: auto;
}

/* ==========================================================================
6. PRODUCT CARD SELECTION (INSIDE ROOMS)
========================================================================== */
.product-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.product-card-label {
    display: block;
    cursor: pointer;
    text-align: center;
    border: 3px solid #eee;
    transition: 0.2s ease-in-out;
    position: relative;
    background: white;
}

.product-card-label:hover {
    border-color: #ccc;
}

.product-card-label img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    margin-bottom: 10px;
}

.product-card-label .checked-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 24px;
    width: 24px;
    background-color: #28a745;
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    z-index: 2;
}

/* Product Card Checked State */
.product-radio:checked+.product-card-label {
    border-color: var(--brand-green) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-radio:checked+.product-card-label .checked-icon {
    display: flex;
}

.product-name {
    font-weight: bold;
    margin: 5px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    line-height: 1.4;
    padding: 0 5px;
}

.product-price {
    color: var(--brand-green);
    font-weight: 700;
    margin-bottom: 10px;
}