/* ===================================================================
   PRICING CALCULATOR - REDESIGNED (PREMIUM)
   =================================================================== */

.pricing-calculator-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 80px 0 120px 0; /* Extra padding bottom for summary bar */
    position: relative;
    /* overflow: hidden; Removed to ensure sticky bar works if needed, standard is ok */
}

.calculator-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* --- Header --- */
.calculator-header {
    text-align: center;
    margin-bottom: 50px;
}

.calculator-header h2 {
    font-size: 2.5em;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 15px 0;
    letter-spacing: -1px;
}

.calculator-header p {
    font-size: 1.1em;
    color: #64748b;
    margin: 0;
}

/* --- Category Tabs (Centered Pill Design) --- */
.category-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.category-tabs {
    display: inline-flex;
    background: #fff;
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    padding: 12px 24px;
    border-radius: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.category-tab:hover {
    color: #0ea5e9;
    background: #f1f5f9;
}

.category-tab.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.category-tab i {
    font-size: 1.1em;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
    transition: all 0.3s ease;
}

/* --- Service Card (Premium Glassmorphism) --- */
.service-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 180px;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: #bae6fd;
}

/* Selection State */
.service-card.selected {
    background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px #0ea5e9, 0 10px 25px rgba(14, 165, 233, 0.15);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.service-name {
    font-weight: 700;
    font-size: 1.15em;
    color: #1e293b;
    line-height: 1.3;
    padding-right: 10px;
}

.badge-popular {
    background: #fef3c7;
    color: #b45309;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.service-desc {
    font-size: 0.95em;
    color: #64748b;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes footer down */
    line-height: 1.5;
}

.service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.service-price {
    font-weight: 700;
    font-size: 1.25em;
    color: #0ea5e9;
}

.service-checkbox {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-card:hover .service-checkbox {
    background: #e2e8f0;
    color: #64748b;
}

.service-card.selected .service-checkbox {
    background: #0ea5e9;
    color: white;
    transform: scale(1.1);
}

/* --- Summary Bar (Bottom) --- */
.calculator-summary-bar {
    position: relative;
    /* Static placement */
    width: 100%;
    /* Full width of container */
    max-width: 100%;
    background: rgba(15, 23, 42, 0.95);
    /* Dark theme for contrast */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 20px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    margin-top: 40px;
}

.summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.summary-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.selected-count {
    font-size: 0.85em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.selected-items-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 34px;
    overflow: hidden;
}

.placeholder-text {
    font-style: italic;
    color: #64748b;
    font-size: 0.9em;
}

.service-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.service-tag:hover {
    background: rgba(239, 68, 68, 0.25); /* Red hint for delete */
    color: #fca5a5;
}

.summary-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 20px;
    min-width: 150px;
}

.price-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-group .label {
    font-size: 0.9em;
    color: #94a3b8;
}

.price-group .amount {
    font-size: 1.8em;
    font-weight: 800;
    color: #22d3ee;
    line-height: 1;
}

.discount-info {
    font-size: 0.8em;
    color: #4ade80; /* Green */
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* CTA Button in Summary */
.calculator-cta {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
    white-space: nowrap;
}

.calculator-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.calculator-cta:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Price Bump Animation */
.amount.price-bump {
    animation: bump 0.3s ease-out;
}

@keyframes bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #fff; }
    100% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .calculator-summary-bar {
        padding: 20px;
        margin-top: 30px;
        flex-direction: column;
        align-items: stretch;
    }

    .summary-content {
        flex-direction: column;
        gap: 15px;
    }

    .summary-details {
        width: 100%;
    }

    .summary-totals {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-right: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 12px;
    }

    .calculator-cta {
        width: 100%;
        justify-content: center;
    }

    /* Reset extra padding bottom since bar is not fixed */
    .pricing-calculator-section {
        padding-bottom: 80px;
    }
}