* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Layout --- */
header {
    background-color: #2d4871;
}

button {
    font-family: "Work Sans", sans-serif;
}

.calc-form {
    margin-top: 2rem;
}

.mobile-cart-trigger {
    display: none;
    background-color: #2d4871;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    align-items: center;
    gap: 8px;
}

.badge {
    background-color: #2d4871;
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Main Grid Layout */
.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 350px);
    gap: 20px;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    align-items: start; 
}

/* --- Tabs --- */
.tabs-header {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 2px solid #2d4871;
}
.tabs-header::-webkit-scrollbar { display: none; }

.tab-btn {
    background: #e5e7eb;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: #2d4871;
    color: white;
}

.tab-content {
    background-color: white;
    min-height: 600px;
    padding-top: 2rem;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

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

/* --- Forms --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.checkbox-group input { width: 20px; height: 20px; }

.form-group:not(.checkbox-group) label {
    text-transform: uppercase;
}

label {
    font-size: 80%;
    color: #8c8c8c;
}

input, 
select, 
textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    font-size: clamp(16px,1.1vw,20px);
    font-family: "Work Sans", sans-serif;
}
input:focus, 
select:focus, 
textarea:focus {
    border-color: #2d4871;
}

textarea {
    field-sizing: content;
    min-height: 1lh;
}

/* --- Services List (ROWS) --- */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.service-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 12px 0;
    gap: 1rem;
    transition: border-color 0.2s;
}

.service-info {
    flex: 1;
}

.service-title {
    line-height: 1;
}

.service-desc {
    font-size: 85%;
    color: #999;
    margin-bottom: 25px;
}

.service-desc > *:first-child {
    margin-top: 10px;
}

.service-desc ul {
    padding-left: 20px;
}

.service-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 220px; 
    justify-content: flex-end;
}

.service-row .service-info .service-title {
    text-wrap: balance;
}

.button-small {
    font-size: clamp(12px,0.75vw,14px);
    padding: 6px 20px;
}

.add-button {
    font-size: clamp(16px, 1.1vw, 20px);
    border-color: #2d4871;
    color: #000;
    background-color: transparent;
    text-transform: uppercase;
    cursor: pointer;
    transition: .3s all ease-in-out;
}

.add-button:hover {
    background-color: #2d4871;
    color: #fff;
    text-transform: uppercase;
}

.service-price {
    font-weight: bold;
    min-width: 70px;
    text-align: right;
}

/* Qty Controls */
.qty-control {
    display: flex;
    align-items: center;
    padding: 1px;
}

.qty-btn {
    width: 3ch;
    border: none;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: #2d4871;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120%;
}

.qty-input {
    width: 1ch;
    text-align: center;
    border: none;
    background: transparent;
    padding: 0;
}

.btn-small {
    background-color: #2d4871;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.section-header {
    margin-block: 2rem 1rem;
    color: #2d4871;
    font-size: 140%;
    font-weight: bold;
}

/* --- Sidebar Cart --- */
.sidebar-area {
    background: white;
    padding: 1.5rem;
    position: sticky;
    top: 90px; 
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.sidebar-area h3 {
    font-size: clamp(24px, 2vw, 28px);
}

.cart-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cart-personal {
    padding-bottom: 2rem;
}

.cart-personal .form-group:not(:last-child) {
    margin-bottom: 1rem;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    scrollbar-width: thin;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}

.item-remove {
    color: red;
    background: none;
    border: none;
    font-size: 120%;
    cursor: pointer;
    text-decoration: none;
    margin-left: 10px;
}

.cart-footer {
    border-top: 1px solid #999;
    padding-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.price-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #bfdbfe;
}
.price-display {
    font-size: 2rem;
    font-weight: bold;
    color: #2d4871;
    margin: 0.5rem 0;
}

.submit-button {
    font-size: clamp(16px,1.1vw,20px);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    transition: .3s all ease-in-out;
}

.submit-button:hover {
    background-color: #fff;
    color: #000;
}

.item-info h4 {
    font-family: "Work Sans", sans-serif;
}


@media (min-width: 992px) and (max-width: 1250px) {
    .main-layout {
        grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    }
    .tab-btn {
        padding: 12px 8px;
        font-size: 0.875rem;
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 991px) {
    .main-layout {
        grid-template-columns: 1fr; 
    }

    .mobile-cart-trigger {
        display: flex;
        width: calc(100vw - 2rem);
        margin: 0 auto;
    }

    .sidebar-area {
        position: static; 
        order: 2; 
        max-height: none;
        padding: 1.5rem 0;
    }

    .service-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 0;
        gap: 0.5rem;
    }
    
    .service-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }

    .tabs-header {
        width: 100vw;
        padding: 0 1rem;
        margin: 0 -1rem;
        border-bottom: unset;
    }

    .tab-btn {
        padding: 10px 18px;
        border-radius: 8px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

}

.mt-200 {
    margin-top: 200px;
}