﻿/* ========================================
   GLOBAL SITE STYLES - site.css (CLEANED VERSION)
   Removed finance/lease specific styles
   ======================================== */

/* ========================================
   CSS Variables & Theme Configuration
   ======================================== */
:root {
    /* Brand Colors */
    --bs-primary: #0079ab;
    --bs-primary-rgb: 0, 121, 171;
    --bs-primary-hover: #006090;
    --bs-primary-light: rgba(0, 121, 171, 0.25);
    --bs-primary-lighter: rgba(0, 121, 171, 0.1);
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 10px 40px -10px rgba(0, 121, 171, 0.35);
    --shadow-glow: 0 0 20px rgba(0, 121, 171, 0.15);
    --bs-link-color: var(--bs-primary);
    --bs-link-hover-color: var(--bs-primary);
    --bs-pagination-active-bg: var(--bs-primary) !important;
    /* Animations */
    --transition-fast: 150ms;
    --transition-base: 250ms;
    --transition-slow: 350ms;
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Layout */
    --header-height: 100px;
    --header-height-mobile: 100px;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

/* Dark theme adjustments */
[data-bs-theme="dark"] {
    --bs-primary-light: rgba(0, 121, 171, 0.45);
    --bs-primary-lighter: rgba(0, 121, 171, 0.25);
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 10px 40px -10px rgba(0, 121, 171, 0.45);
    --shadow-glow: 0 0 30px rgba(0, 121, 171, 0.25);
}

/* ========================================
   Base Typography & Resets
   ======================================== */
body {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   Bootstrap Primary Color Override
   ======================================== */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus-visible,
.btn-primary.disabled,
.btn-primary:disabled,
.btn-check:checked + .btn,
.show > .btn-primary.dropdown-toggle,
.active > .page-link, .page-link.active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active {
        background-color: var(--bs-primary-hover) !important;
        border-color: var(--bs-primary-hover) !important;
    }

.btn-outline-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus,
    .btn-outline-primary:active {
        background-color: var(--bs-primary) !important;
        border-color: var(--bs-primary) !important;
        color: #fff !important;
    }

.btn-check:checked+.btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check)+.btn:active {
    color: var(--bs-btn-active-color);
    background-color: var(--bs-btn-active-bg);
    border-color: var(--bs-btn-active-border-color);
}

a {
    color: var(--bs-primary) !important;
    text-decoration: none !important;
}

    a:hover {
        color: var(--bs-primary-hover) !important;
    }

.text-primary {
    color: var(--bs-primary) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.badge.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* Form controls */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem var(--bs-primary-light) !important;
}

.form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.form-switch .form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

/* ========================================
   Layout & Spacing
   ======================================== */
main,
.main,
#main,
[role="main"] {
    padding-top: var(--header-height) !important;
    min-height: calc(100vh - var(--header-height));
}

@media (max-width: 768px) {
    main,
    .main,
    #main,
    [role="main"] {
        padding-top: var(--header-height-mobile) !important;
        min-height: calc(100vh - var(--header-height-mobile));
    }
}

/* ========================================
   ID-Based Styles (Preserved from original)
   ======================================== */

/* Vehicle Spinner */
#vehicleSpinner {
    display: none;
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    cursor: pointer;
    background-color: var(--bs-primary);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    transition: all var(--transition-base) ease;
}

    #backToTop:hover {
        background-color: var(--bs-primary-hover);
        transform: translateY(-2px);
    }

/* Carousel */
#carousel-inner .carousel-item {
    min-height: 310px;
}

#carForm {
    min-height: 460px;
}

#indicators {
    position: static;
}

    #indicators img {
        max-width: 40px !important;
        height: 100%;
        opacity: 0.3;
    }

        #indicators img.active {
            opacity: 1;
        }

/* Full Page Gallery */
#fullPageGallery {
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 10;
    display: flex;
    align-items: end;
    justify-content: end;
    width: 15%;
    padding: 0;
    color: #fff;
    text-align: right;
    background: 0 0;
    border: 0;
    opacity: .5;
    transition: opacity .15s ease;
}

    #fullPageGallery:hover {
        opacity: 0.9;
    }

/* Loading Info */
#loadInfo {
    position: fixed !important;
    z-index: 99999 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(4px);
    display: none;
}

/* Sold Overlay */
#soldOverlay {
    position: fixed !important;
    z-index: 99999 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(8px);
}

    #soldOverlay h1 {
        font-size: 4rem;
        text-shadow: 0 4px 6px rgba(220, 53, 69, 0.3);
        animation: pulse 2s infinite;
    }

/* ========================================
   Quote Page ID-Based Styles
   ======================================== */

/* Global overflow fix for the quote page */
#main-container {
    min-height: 100vh !important;
    overflow-x: hidden !important;
}

/* Ensure quote data section doesn't overflow */
#quoteData {
    overflow-x: hidden !important;
    max-width: 100%;
}

/* Vehicle Data Section */
#vehicleData {
    margin-bottom: 2rem;
}

/* Adjusted Price Wrapper */
#adjustedPrice-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 1rem -1rem !important;
    padding: 1rem !important;
}

/* Rebate Wrapper */
#rebate_wrapper {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-radius: 8px;
    padding: 1rem !important;
}

/* Final Price */
#final_price {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: var(--bs-primary);
}

/* Discount Wrapper */
#discount_wrapper {
    background: rgba(220, 53, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.25rem;
}

#final_price_percent_discount {
    font-weight: 600;
}

/* Calculate Button */
#calculateBtn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-hover) 100%);
    color: white !important;
    border-radius: 6px;
    font-weight: 600;
    transition: all 200ms ease;
    cursor: pointer;
    border: none;
}

    #calculateBtn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px -1px rgba(0, 121, 171, 0.3);
    }

    #calculateBtn .fa-calculator {
        color: white !important;
    }

/* TTL Data Section */
#ttlData {
    margin-bottom: 2rem;
}

/* OTD Price */
#otd_price {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem !important;
    font-weight: 800;
    border-radius: 8px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 6px -1px rgba(40, 167, 69, 0.3);
    color: white;
}

/* Save Wrapper */
#save-wrapper {
    margin-bottom: 2rem;
}

/* Quote Toast */
#quoteToast {
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

    #quoteToast.bg-success {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    }

    #quoteToast .toast-body {
        padding: 1rem 1.5rem;
        font-weight: 600;
    }

#quote_id_text {
    color: white;
    font-weight: 800;
}

#quote_id {
    font-weight: 600;
}

#zip_code {
    max-width: 200px;
}

#total_cash {
    font-weight: 700;
    color: var(--bs-danger);
}

#rebate_expiry_date {
    color: var(--bs-gray-600);
}

#additional_discount {
    max-width: 120px;
}

/* ========================================
   Modern Card Styles
   ======================================== */
.card {
    border: none !important;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base) var(--ease-smooth);
    position: relative;
    background: var(--bs-card-bg, #fff);
}

.card-body {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
}

/* ========================================
   Utility Classes
   ======================================== */
.super-z {
    z-index: 999999;
}

.selected-vehicle {
    border: 2px solid var(--bs-primary) !important;
    box-shadow: var(--shadow-lg), var(--shadow-primary);
    animation: selectPulse 0.5s var(--ease-bounce);
}

.infoWindow {
    min-width: 480px;
    max-height: 300px;
    overflow: auto;
    background-color: var(--bs-card-bg, #fff);
    color: var(--bs-body-color, #000);
}

/* ========================================
   Form Enhancements
   ======================================== */
.form-check-switch {
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .form-check-switch .form-check-input {
        position: relative;
        width: 3rem;
        height: 1.5rem;
        margin-left: 0;
        margin-right: 0.5rem;
        cursor: pointer;
        background-color: #dee2e6;
        border: none;
        transition: all 200ms ease;
    }

        .form-check-switch .form-check-input:checked {
            background-color: var(--bs-primary);
            box-shadow: 0 0 0 0.2rem var(--bs-primary-lighter);
        }

    .form-check-switch .form-check-label {
        margin-bottom: 0;
        cursor: pointer;
        font-weight: 500;
        color: #495057;
        transition: color 200ms ease;
    }

    .form-check-switch:hover .form-check-label {
        color: var(--bs-primary);
    }

/* Info Icons */
.fa-circle-info {
    font-size: 0.75rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 200ms ease;
}

    .fa-circle-info:hover {
        color: var(--bs-primary);
        transform: scale(1.2);
    }

/* ========================================
   Horizontal Tabs Component - Deal Scenarios
   ======================================== */
.deal-tabs-container {
    background: white;
    overflow: hidden;
    margin-bottom: 1.5rem;
    overflow-x: hidden;
}

.deal-tabs-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--bs-primary);
}

.deal-tabs-wrapper {
    padding: 0;
}

/* Tab Navigation */
.deal-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    overflow-x: auto;
}

/* Tab Items */
.deal-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: #6c757d;
    border: 2px solid transparent;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-base) var(--ease-smooth);
    position: relative;
    min-width: fit-content;
}

    .deal-tab-item:hover {
        background: var(--bs-primary-lighter);
        color: var(--bs-primary);
        transform: translateY(-1px);
    }

    .deal-tab-item.active {
        background: var(--bs-primary);
        color: white;
        border-color: var(--bs-primary);
        box-shadow: var(--shadow-sm);
    }

        .deal-tab-item.active:hover {
            background: var(--bs-primary-hover);
            border-color: var(--bs-primary-hover);
            transform: none;
        }

    /* Tab Icons */
    .deal-tab-item i {
        font-size: 1rem;
        transition: transform var(--transition-base);
    }

    .deal-tab-item:hover i {
        transform: scale(1.1);
    }

    .deal-tab-item.active i {
        color: white;
    }

/* Tab Content Panels */
.deal-tab-content {
    padding: 1.5rem;
    min-height: 300px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
}

.deal-tab-panel {
    display: none;
    animation: fadeInUp var(--transition-base) var(--ease-smooth);
    width: 100%;
    overflow-x: hidden;
}

    .deal-tab-panel.active {
        display: block;
    }

/* Empty State */
.deal-tab-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6c757d;
}

    .deal-tab-empty i {
        font-size: 3rem;
        color: #dee2e6;
        margin-bottom: 1rem;
    }

    .deal-tab-empty h5 {
        color: #495057;
        margin-bottom: 0.5rem;
    }

    .deal-tab-empty p {
        margin: 0;
        font-size: 0.9rem;
    }

/* Incentives Grid within Tabs */
.deal-incentives-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
}

.deal-incentive-category {
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    overflow: hidden;
}

    .deal-incentive-category h6 {
        color: var(--bs-primary);
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #dee2e6;
    }

/* Incentive List Container */
.incentive-list {
    overflow: hidden;
}

/* Incentive items */
.incentive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    overflow: hidden;
}

    .incentive-item:hover {
        background: var(--bs-gray-100);
        transform: translateX(2px);
    }

    .incentive-item.disabled {
        opacity: 0.5;
        pointer-events: none;
    }

    .incentive-item .form-check {
        flex: 1;
        overflow: hidden;
    }

    .incentive-item .form-check-input,
    .incentive-checkbox {
        margin-top: 0.125em !important;
        outline-offset: -2px !important;
    }

        .incentive-item .form-check-input:focus,
        .incentive-checkbox:focus {
            box-shadow: 0 0 0 0.1rem var(--bs-primary-light) !important;
        }

        .incentive-item .form-check-input:checked,
        .incentive-checkbox:checked {
            background-color: var(--bs-primary) !important;
            border-color: var(--bs-primary) !important;
        }

    .incentive-item .form-check-label {
        display: inline-flex;
        align-items: center;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 3rem);
    }

    .incentive-item .info-btn {
        margin-left: 0.25rem;
        padding: 0;
        border: none;
        background: none;
        line-height: 1;
        vertical-align: middle;
    }

/* Incentive value */
.incentive-value {
    font-weight: 700;
    color: var(--bs-success);
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 1rem;
}

    .incentive-value.selected {
        color: var(--bs-primary);
        font-weight: 800;
    }

    .incentive-value.disabled {
        opacity: 0.5;
    }

/* ========================================
   Quote Page Component Styles
   ======================================== */
.quote-header-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.zip-input-wrapper .input-group {
    max-width: 200px;
}

.vehicle-card,
.pricing-card,
.ttl-card,
.action-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header-custom {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--bs-primary);
}

.section-subtitle {
    color: var(--bs-primary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.detail-item,
.fee-item,
.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.final-price-wrapper {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-rebates {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rebate-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.otd-price-box {
    background: var(--bs-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.otd-amount {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.disclaimer-box {
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.disclaimer-title {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.disclaimer-text {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Tab Loading Overlay */
.tab-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    min-height: 300px;
    animation: fadeIn var(--transition-fast) ease-out;
}

    .tab-loading-overlay .spinner-border {
        width: 3rem;
        height: 3rem;
        border-width: 0.3rem;
    }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes selectPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .deal-tabs {
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .deal-tab-item {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

        .deal-tab-item i {
            font-size: 0.9rem;
        }

    .deal-tab-content {
        padding: 1rem;
    }

    .deal-tab-badge {
        display: none;
    }
}

/* ========================================
   Payment Results Styling
   ======================================== */
.payment-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-result-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    transition: all var(--transition-fast);
    position: relative;
}

    .payment-result-item:hover {
        border-color: var(--bs-primary);
        transform: translateX(2px);
        box-shadow: var(--shadow-sm);
    }

    .payment-result-item.best-rate {
        background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
    }

    /* Selected payment option styling */
    .payment-result-item.selected {
        border: 2px solid var(--bs-primary);
        background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
        box-shadow: 0 0 0 3px rgba(0, 121, 171, 0.1);
    }

        .payment-result-item.selected::before {
            content: '✓';
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            width: 24px;
            height: 24px;
            background: var(--bs-primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            animation: checkmarkPop 250ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.payment-result-item[data-manually-modified="true"] {
    border-left: 3px solid #17a2b8;
    padding-left: calc(1rem - 2px); /* Adjust padding to compensate for border */
}

    /* When modified payment is also selected */
    .payment-result-item[data-manually-modified="true"].selected {
        border-left: 3px solid #17a2b8;
    }

/* Payment value update animation */
.payment-value.updating {
    animation: valuePulse 350ms ease-in-out;
}

@keyframes valuePulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        color: var(--bs-success);
    }
}

    /* When an item is both best-rate and selected */
    .payment-result-item.best-rate.selected {
        border-color: var(--bs-primary);
        background: linear-gradient(135deg, #e6f7ff 0%, #f0fff4 50%, #ffffff 100%);
    }

.payment-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.payment-institution {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tier-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 400;
}

.payment-result-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-primary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.monthly-payment {
    display: flex;
    flex-direction: column;
}

.payment-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    line-height: 1;
}

.rate-details {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.payment-summary {
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.summary-details {
    display: flex;
    flex-direction: column;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

    .summary-item:last-child {
        border-bottom: none;
    }

    .summary-item span {
        color: #6c757d;
    }

    .summary-item strong {
        color: #212529;
        font-weight: 600;
    }



/* Mobile responsive for payment results */
@media (max-width: 768px) {
    .payment-primary {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-value {
        font-size: 1.25rem;
    }

    .rate-details {
        margin-top: 0.5rem;
    }
}

/* Best Payment Card */
.best-payment-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    border: 2px solid var(--bs-primary);
}

.best-payment-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bs-primary);
    line-height: 1;
}

/* Calculator Card (matching other cards) */
.calculator-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Modal adjustments */


/* Finance/Lease Modal Side-by-Side Layout */
#incentivesModal .col-lg-7 {
    border-left: 2px solid #dee2e6;
    padding-left: 1.5rem;
    min-height: 400px;
}

#incentivesModal .col-lg-5 {
    padding-right: 1.5rem;
}

/* Make payment items more compact in modal */
#incentivesModal .payment-result-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

#incentivesModal .payment-value {
    font-size: 1.25rem;
}

/* Ensure columns stay side-by-side until medium breakpoint */
@media (max-width: 991px) {
    #incentivesModal .col-lg-5,
    #incentivesModal .col-lg-7 {
        max-width: 100%;
        flex: 0 0 100%;
    }

    #incentivesModal .col-lg-7 {
        border-left: none;
        border-top: 2px solid #dee2e6;
        padding-left: 15px;
        padding-top: 1rem;
        margin-top: 1rem;
    }
}

/* ========================================
   Inventory Page Layout - Final Complete CSS Additions
   ======================================== */

/* Filter Sidebar - Desktop */
.filter-sidebar {
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bs-primary);
}

    .filter-header h5 {
        margin: 0;
        color: var(--bs-primary);
        font-weight: 600;
    }

/* Filter Form Styles */
.filter-form {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.filter-actions {
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Results Header */
.results-header {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.results-count {
    color: #495057;
}

/* Custom Layout Classes */
.inventory-sidebar {
    /* Mobile hiding handled by d-none d-lg-block */
}

.inventory-content {
    width: 100%;
}

/* Vehicle Grid - Base */
#vehicleContainer,
.vehicle-grid {
    display: grid !important;
    gap: 1.5rem;
    max-width: 100%;
}

    /* Override Bootstrap column classes if present */
    #vehicleContainer > .col,
    #vehicleContainer > [class*="col-"] {
        max-width: 100% !important;
        flex: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

/* Vehicle Card Styles */
.card,
.vehicle-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,.125);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .card:hover,
    .vehicle-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    /* Fix image sizing in vehicle cards */
    .card .ratio img {
        object-fit: cover !important;
        width: 100%;
        height: 100%;
    }

        .card .ratio img.lazy {
            object-fit: cover !important;
            width: 100%;
            height: 100%;
        }

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Vehicle Details Typography */
.vehicle-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.vehicle-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0.75rem;
}

.vehicle-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
}

/* Offcanvas Filter Styles for Mobile */
#mobileFilters .offcanvas-body {
    padding: 1rem;
}

#mobileFilters .filter-form {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

#mobileFilterActions {
    position: sticky;
    bottom: 0;
    background: white;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Loading State */
.vehicle-container-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

/* Empty State */
.vehicle-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

    .vehicle-empty-state i {
        font-size: 4rem;
        color: #dee2e6;
        margin-bottom: 1rem;
    }

    .vehicle-empty-state h4 {
        color: #495057;
        margin-bottom: 0.5rem;
    }

    .vehicle-empty-state p {
        color: #6c757d;
        margin: 0;
    }

/* Responsive Layouts */

/* Mobile: 1 column */
@media (max-width: 767px) {
    #vehicleContainer,
    .vehicle-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .results-header .row {
        gap: 1rem;
    }

    .results-header .d-flex {
        justify-content: center !important;
    }
}

/* Tablet: 2 columns, no sidebar */
@media (min-width: 768px) and (max-width: 991px) {
    #vehicleContainer,
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Desktop: 33% sidebar + 2 cars */
@media (min-width: 992px) {
    .inventory-sidebar {
        flex: 0 0 30%;
        max-width: 30%;
    }

    .inventory-content {
        flex: 0 0 70%;
        max-width: 70%;
    }

    #vehicleContainer,
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Large screens: 25% sidebar + 3 cars */
@media (min-width: 1600px) {
    .inventory-sidebar {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .inventory-content {
        flex: 0 0 75%;
        max-width: 75%;
    }

    #vehicleContainer,
    .vehicle-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Extra small screens adjustments */
@media (max-width: 575px) {
    .results-header {
        padding: 0.75rem 1rem;
    }

    .results-count {
        font-size: 1rem;
        text-align: center;
    }

    .input-group-sm {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }

    #vehicleContainer,
    .vehicle-grid {
        gap: 0.75rem;
    }
}

/* Sticky sidebar on desktop */
@media (min-width: 992px) {
    .sticky-lg-top {
        position: sticky;
        top: 1rem;
        z-index: 10;
    }
}

/* Full width when no sidebar */
.inventory-content.no-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
}

    /* Adjust grid for more columns when full width */
    .inventory-content.no-sidebar #vehicleContainer,
    .inventory-content.no-sidebar .vehicle-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

/* Responsive adjustments for no-sidebar */
@media (min-width: 1200px) {
    .inventory-content.no-sidebar #vehicleContainer,
    .inventory-content.no-sidebar .vehicle-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1600px) {
    .inventory-content.no-sidebar #vehicleContainer,
    .inventory-content.no-sidebar .vehicle-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Keep mobile/tablet responsive */
@media (max-width: 991px) {
    .inventory-content.no-sidebar #vehicleContainer,
    .inventory-content.no-sidebar .vehicle-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .inventory-content.no-sidebar #vehicleContainer,
    .inventory-content.no-sidebar .vehicle-grid {
        grid-template-columns: 1fr !important;
    }
}

#tradeForm .filter-form {
    max-height: none; /* Remove height restriction for trade forms */
    overflow: visible;
}

.password-change {
    max-width: 420px;
    margin:0 auto;
}