:root {
    --bs-primary: #059669;
    /* Emerald 600 - Premium Deep Green */
    --bs-primary-rgb: 5, 150, 105;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Custom Slate Palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* On-surface text (dark green for pills/badges on green backgrounds) */
    --text-on-surface: #065F46;

    /* Accents */
    --orange-subtle: #ffedd5;
    --orange-dark: #9a3412;
    --orange-border: #fed7aa;

    --green-subtle: #d1fae5;
    /* Emerald 100 - lighter, cooler */
    --green-dark: #064e3b;
    /* Emerald 900 */

    --blue-subtle: #e0f2fe;
    /* Reverting to a very light blue for neutral accents */

    /* Mobile Spacing System */
    --mobile-spacing-xs: 0.5rem;
    --mobile-spacing-sm: 0.75rem;
    --mobile-spacing-md: 1rem;
    --mobile-spacing-lg: 1.5rem;
    --mobile-spacing-xl: 2rem;
    --mobile-spacing-2xl: 2.5rem;
}

.hero-pattern {
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 32px 32px;
}

body {
    background-color: var(--slate-50);
    color: var(--slate-700);
    -webkit-tap-highlight-color: transparent;
}

/* ===========================================
   BOOTSTRAP PRIMARY COLOR OVERRIDES
   These override Bootstrap's compiled blue styles
   =========================================== */

/* Primary buttons */
.btn-primary {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: white !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #047857 !important;
    border-color: #047857 !important;
    color: white !important;
    background-image: none;
}

.btn-primary:active,
.btn-primary.active {
    background-color: #064e3b !important;
    border-color: #064e3b !important;
    background-image: none;
}

/* Outline primary buttons */
.btn-outline-primary {
    color: #059669 !important;
    border-color: #059669 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: white !important;
}

/* Text primary */
.text-primary {
    color: #059669 !important;
}

/* Background primary */
.bg-primary {
    background-color: #059669 !important;
}

/* Primary subtle backgrounds */
.bg-primary-subtle {
    background-color: #d1fae5 !important;
}

/* Border primary */
.border-primary {
    border-color: #059669 !important;
}

.border-primary-subtle {
    border-color: #6ee7b7 !important;
}

/* Badges */
.badge.bg-primary {
    background-color: #059669 !important;
    color: white !important;
}

/* Links */
a {
    color: #059669;
}

a:hover {
    color: #047857;
}

/* Form focus states */
.form-control:focus,
.form-select:focus {
    border-color: #059669 !important;
    box-shadow: 0 0 0 0.25rem rgba(5, 150, 105, 0.25) !important;
}

/* Dropdown active states */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #059669 !important;
}

/* Nav link active */
.nav-link.active {
    color: #059669 !important;
}

/* Spinner */
.spinner-border.text-primary {
    color: #059669 !important;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.025em;
    color: var(--slate-900);
}

.fw-800 {
    font-weight: 800 !important;
}

.fw-900 {
    font-weight: 900 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.start-0 {
    left: 0 !important;
}

.ls-1 {
    letter-spacing: 0.1em;
}

.fs-xs {
    font-size: 0.75rem;
}

/* Accessible Hiding (The "Clip Pattern") */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Utilities */
.text-slate-500 {
    color: var(--slate-500) !important;
}

.text-slate-800 {
    color: var(--slate-800) !important;
}

.text-slate-900 {
    color: var(--slate-900) !important;
}

.bg-slate {
    background-color: var(--slate-50) !important;
}

.bg-slate-50 {
    background-color: var(--slate-50) !important;
}

.bg-slate-200 {
    background-color: var(--slate-200) !important;
}

.bg-slate-900 {
    background-color: var(--slate-900) !important;
}

.text-slate-300 {
    color: var(--slate-300) !important;
}

.text-slate-600 {
    color: var(--slate-600) !important;
}

.border-slate-100 {
    border-color: var(--slate-100) !important;
}

.border-slate-200 {
    border-color: var(--slate-200) !important;
}

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

.text-green-dark {
    color: var(--green-dark);
}

.text-green {
    color: #16a34a;
}

.bg-blue-subtle {
    background-color: var(--blue-subtle);
}

.border-dashed {
    border-style: dashed !important;
}

/* Card Styling */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.rounded-4,
.accordion-item.rounded-4 {
    border-radius: 1rem !important;
}

/* Form Labels - Apple-compact */
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Controls */
.form-control,
.form-select {
    padding: 0.5rem 0.75rem;
    border-color: var(--slate-200);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.form-control.form-control-lg,
.form-select.form-select-lg {
    padding: 0.625rem 1rem;
    font-size: 1rem;
}

/* Upload Zone - Magical Dropzone */
.upload-zone {
    padding: 2rem 1.5rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%23CBD5E1FF' stroke-width='2' stroke-dasharray='12%2c 12' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
}

.upload-zone:hover,
.upload-zone:focus-visible,
.upload-zone.dragover {
    background-color: var(--green-subtle);
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='24' ry='24' stroke='%23059669FF' stroke-width='3' stroke-dasharray='0' stroke-linecap='square'/%3e%3c/svg%3e");
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    outline: none;
}

/* Custom Card Radios */
.custom-card-label {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--slate-200);
    padding: 0.75rem;
}

/* Base: softer price text for desktop sidebar context.
   Mobile override below (@media max-width:991.98px) makes these bolder/higher-contrast. */
.custom-card-label .small.text-muted,
.custom-card-label .text-muted {
    font-size: 0.8rem !important;
    color: var(--slate-600) !important;
    font-weight: 500;
}

.custom-card-label .small.text-muted span,
.custom-card-label .text-muted span {
    font-weight: 600;
    color: var(--slate-700) !important;
}

.custom-card-label i {
    font-size: 1.25rem;
}

.custom-card-radio input:checked+.custom-card-label {
    border-color: var(--bs-primary);
    border-width: 3px;
    /* Thicker border for better visibility */
    background-color: #e6f4ea;
    /* Mint green for brand consistency */
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.1);
    /* Removed transform scale - was causing overflow */
    transition: all 0.2s ease;
    /* Ensure background respects rounded corners */
    background-clip: padding-box;
}

/* Active state feedback for touch */
.custom-card-radio input:active+.custom-card-label {
    transform: scale(0.98);
}

/* Button Pulse & Scale */
.btn-scale {
    transition: transform 0.2s ease;
}

.btn-scale:active {
    transform: scale(0.96);
}

/* Enhanced Radio Button Interactions */
.btn-check:checked+.btn-outline-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.btn-outline-primary:hover {
    background-color: rgba(22, 163, 74, 0.1);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.btn-outline-primary:active {
    transform: scale(0.98);
}

/* Binding Card Radio Buttons */
.custom-card-radio.binding-option .custom-card-label {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.custom-card-radio.binding-option input:checked+.custom-card-label i {
    color: var(--bs-primary);
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Page Count Edit Button */
#pageCountEditBtn {
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

#pageCountEditBtn:hover {
    background-color: var(--green-subtle) !important;
    transform: scale(1.05);
}

#pageCountSuccess {
    animation: fadeIn 0.3s ease-in;
    border: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Alert Enhancements */
.alert {
    border-radius: 0.5rem;
    border-width: 1px;
    padding: 0.625rem 1rem;
}

.alert-info {
    background-color: var(--blue-subtle);
    border-color: var(--bs-primary);
    color: var(--slate-800);
}

/* PDF Thumbnail */
.pdf-thumb canvas {
    border: 1px solid var(--slate-200);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Landing Page Extras */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.blur-3xl {
    filter: blur(64px);
}

/* Modern Navbar Styling */
.navbar-blur {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    transition: all 0.3s ease;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Center nav links on page using CSS Grid */
@media (min-width: 992px) {
    .navbar>.container {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    /* Make collapse wrapper transparent to grid */
    .navbar .navbar-collapse {
        display: contents !important;
    }

    .navbar-nav.mx-auto {
        justify-self: center;
        display: flex;
        gap: 0.5rem;
        margin: 0 !important;
    }

    /* Push right actions to end of their 1fr column */
    .navbar .navbar-collapse>.d-flex {
        justify-self: end;
    }
}

/* Cleaner Toggler */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    color: var(--slate-700);
    background-color: transparent;
    transition: all 0.2s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
    background-color: var(--slate-100);
    border-radius: 50%;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23334155' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Better Mobile Menu */
@media (max-width: 991.98px) {

    /* Slimmer Navbar on Mobile */
    .navbar-blur {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .navbar-brand {
        font-size: 1.25rem !important;
    }

    .navbar-brand i {
        font-size: 1.25rem !important;
    }

    .navbar-collapse {
        background: white;
        margin: 0 -0.75rem;
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--slate-100);
        margin-top: 0.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease-in-out;
        /* Smooth animation */
    }

    .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid var(--slate-50);
    }

    .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    /* Hero Section Mobile Optimization */
    .hero-pattern {
        padding-top: 0 !important;
        padding-bottom: var(--mobile-spacing-md) !important;
    }

    .hero-pattern .container {
        padding-top: var(--mobile-spacing-sm) !important;
        padding-bottom: var(--mobile-spacing-md) !important;
    }

    .hero-pattern .row {
        min-height: auto !important;
        padding-top: var(--mobile-spacing-sm) !important;
        padding-bottom: var(--mobile-spacing-lg) !important;
    }

    /* Feature cards: tighter sizing in 2x2 mobile grid */
    .col-6 .hover-lift .bi.fs-3 {
        font-size: 1.25rem !important;
        width: 1em;
        height: 1em;
    }

    .col-6 .hover-lift .rounded-circle.p-3 {
        padding: var(--mobile-spacing-xs);
    }

    .col-6 .hover-lift h3 {
        font-size: 0.875rem;
        line-height: 1.3;
    }

    .col-6 .hover-lift p.small {
        font-size: 0.75rem !important;
    }

    /* Order page hero section - reduce spacing on mobile */
    body.order-page .container.text-center {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        margin-top: 0 !important;
    }

    /* Also reduce spacing on container-fluid for order page */
    body.order-page .container-fluid {
        padding-top: 0.5rem !important;
    }
}

/* Mobile Sticky Bar */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0;
    box-shadow: 0 -4px 20px -5px rgba(0, 0, 0, 0.12);
    z-index: 1040;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    display: none;
}

/* Price breakdown drawer inside sticky bar */
.mobile-price-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
    padding: 0 1rem;
}

.mobile-price-drawer.open {
    max-height: 300px;
    padding: 0.75rem 1rem;
}

.mobile-price-drawer .receipt-row {
    padding: 0.2rem 0;
    font-size: 0.85rem;
}

.mobile-price-drawer .receipt-row span:first-child {
    color: var(--slate-500);
}

.mobile-price-drawer .receipt-row span:last-child {
    font-weight: 600;
    color: var(--slate-800);
}

.mobile-price-drawer hr {
    margin: 0.375rem 0;
    border-color: var(--slate-200);
}

/* Sticky bar main row */
.mobile-sticky-main {
    padding: 0.75rem 1rem;
}

/* Expand/collapse chevron for price drawer */
.mobile-total-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mobile-total-toggle .bi-chevron-up {
    transition: transform 0.3s ease;
    font-size: 0.7rem;
    color: var(--slate-400);
}

.mobile-total-toggle.open .bi-chevron-up {
    transform: rotate(180deg);
}

/* ===========================================
   MOBILE-SPECIFIC ENHANCEMENTS
   =========================================== */

@media (max-width: 991.98px) {

    /* Sticky Mobile Action Bar */
    .mobile-sticky-bar {
        display: block !important;
    }

    /* Add padding to order page container for sticky bar */
    /* IMPORTANT: Only main content area, NOT navbar! */
    body.order-page .container-fluid:not(.navbar .container-fluid),
    body.order-page>.container-fluid,
    body.order-page .container-fluid.min-vh-100 {
        padding-bottom: 120px !important;
    }

    /* Explicitly prevent navbar from getting bottom padding */
    body.order-page .navbar .container,
    body.order-page nav .container,
    .navbar .container,
    nav .container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Enhanced Touch Targets for Checkboxes */
    .form-check:not(.custom-card-radio) {
        padding: 0.75rem;
        margin: 0.5rem 0;
        background: white;
        border-radius: 0.75rem;
        border: 2px solid var(--slate-200);
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
    }

    .form-check:active {
        transform: scale(0.98);
        background-color: var(--slate-50);
    }

    /* Standard Checkboxes (Not Switches) */
    .form-check:not(.form-switch) .form-check-input {
        width: 1.5rem;
        height: 1.5rem;
        margin-top: 0;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        float: none;
        margin-left: 0;
        margin-right: 0.75rem;
        flex-shrink: 0;
    }

    /* Switches (Double-Sided Toggle) */
    .form-check.form-switch .form-check-input {
        width: 3rem;
        /* Larger width for mobile touch */
        height: 1.5rem;
        margin-top: 0;
        cursor: pointer;
        float: none;
        margin-left: 0;
        margin-right: 0.75rem;
        flex-shrink: 0;
        /* Keep Bootstrap's background-image for the switch toggle */
    }

    .form-check-label {
        padding-left: 0.5rem;
        cursor: pointer;
        font-size: 1rem;
        line-height: 1.5rem;
    }

    /* Checked state visual enhancement for SWITCHES/CHECKBOXES only */
    /* NOT for binding cards (they use custom-card-radio) */
    .form-check.form-switch:has(input:checked) {
        border-color: var(--bs-primary);
        background-color: #e6f4ea;
        /* Mint green for brand consistency */
    }

    /* Improved Form Labels for Mobile */
    .form-label {
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: var(--slate-700) !important;
        margin-bottom: 0.5rem;
    }

    /* Better Touch Feedback for Form Controls */
    .form-control:focus,
    .form-select:focus {
        border-width: 2px;
        box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
    }

    /* Optimize Button Touch Targets */
    .btn {
        min-height: 44px;
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    .btn-lg {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }

    /* Optimized Form Select Height */
    .form-select {
        padding: 0.625rem 0.875rem;
    }

    .form-select-lg {
        padding: 0.75rem 1rem;
        /* Slightly reduced from default */
    }

    /* Mobile section spacing — overrides Bootstrap .py-4/.p-4 globally.
       Acceptable because all current .py-4 usage is on page-section wrappers.
       If .py-4 is later used on smaller components, scope these selectors. */
    .py-4 {
        padding-top: var(--mobile-spacing-lg) !important;
        padding-bottom: var(--mobile-spacing-lg) !important;
    }

    body.order-page .py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .p-4 {
        padding: var(--mobile-spacing-md) !important;
    }

    /* Footer Link Enhancement */
    footer .d-flex.gap-3 {
        gap: 1.5rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    footer a {
        font-size: 0.95rem !important;
        padding: 0.75rem 1rem;
        /* Increased for better touch targets */
        min-width: 44px;
        text-align: center;
    }

    /* Card Spacing - removed !important for flexibility */
    .card-body {
        padding: var(--mobile-spacing-lg);
    }

    /* Improved Navbar on Mobile */
    .navbar {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    /* Better Typography Scaling - Fluid Responsive */
    .lead {
        font-size: 1.05rem !important;
        line-height: 1.6 !important;
    }

    /* Enhanced Radio Card Buttons */
    .btn-group {
        gap: 0.5rem;
    }

    .btn-group .btn {
        flex: 1;
        min-width: 0;
        white-space: normal;
        padding: 0.875rem 0.75rem;
        /* Slightly reduced horizontal padding */
        font-size: 0.95rem;
        /* Slightly smaller font */
    }

    /* Prevent stacking on medium-sized phones for important buttons */
    @media (min-width: 360px) {
        .btn-group.w-100 .btn {
            flex-direction: row;
            align-items: center;
            justify-content: center;
        }
    }

    /* Input Group Optimization */
    .input-group-text {
        padding: 0.75rem 1rem;
    }

    /* Small Text Readability */
    .small,
    small {
        font-size: 0.875rem !important;
    }

    /* Price Display Enhancement */
    .text-muted {
        color: var(--slate-600) !important;
    }

    /* Side-by-Side Toggles - Double-sided and Colored Paper */
    .order-page .col-12 .row.g-3 .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* STRICT CSS GRID for Binding Cards - Prevents Jagged "Masonry" Effect */
    /* Force perfect 2-column grid with equal heights */
    .order-page label+.row.g-2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    /* Keep containers but make them behave as proper grid items */
    /* CRITICAL: Add overflow hidden to prevent background bleed */
    .order-page .row.g-2>.col-6.col-sm-4.col-lg {
        /* Remove Bootstrap flex behavior */
        flex: none !important;
        max-width: none !important;
        width: auto !important;
        /* Prevent background overflow on left/right */
        overflow: hidden !important;
    }

    /* Ensure all binding cards have equal height AND proper containment */
    .binding-option {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .binding-option .custom-card-radio {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .binding-option .custom-card-label {
        flex-grow: 1;
        min-height: 100px;
        /* CRITICAL: Contain the background within card boundaries */
        overflow: hidden;
    }

    /* Reduce toggle card bloat - tighter spacing */
    .form-check.form-switch.d-flex.align-items-center {
        padding: 0.75rem 1rem !important;
    }

    /* Shrink upload zone padding by 40% */
    .upload-zone {
        padding: 3rem 1.5rem !important;
    }

    /* Ensure +/- buttons meet touch target size (44x44px minimum) */
    .btn-outline-secondary {
        min-width: 44px;
        min-height: 44px;
        padding: 0.625rem 0.75rem;
    }

    /* ── FIX: Hide hero subtitle + pill on mobile (keep title only) ── */
    body.order-page #heroSection p,
    body.order-page #heroSection .d-inline-flex.rounded-pill {
        display: none !important;
    }

    body.order-page #heroSection h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0 !important;
    }

    /* ── FIX: Hide per-step nav buttons on mobile, use sticky bar ── */
    .wizard-step-nav {
        display: none !important;
    }

    /* ── FIX: Receipt sidebar hidden on mobile — show mini breakdown in sticky bar ── */
    body.order-page .col-lg-4.col-xl-4 {
        display: none !important;
    }

    /* ── FIX: Price labels inside card radios — bigger, bolder on mobile ── */
    .custom-card-label .small.text-muted,
    .custom-card-label .text-muted {
        font-size: 0.85rem !important;
        color: var(--slate-800) !important;
        font-weight: 600;
    }

    .custom-card-label .small.text-muted span,
    .custom-card-label .text-muted span {
        font-weight: 700;
        color: var(--bs-primary) !important;
        font-size: 0.9rem !important;
    }

    /* ── FIX: Fulfillment button price text visibility ── */
    .btn-group.w-100 .btn .text-muted,
    .btn-group.w-100 .btn span[id^="dynamic-delivery"] {
        font-weight: 600 !important;
        opacity: 1 !important;
    }

    .btn-check:checked + .btn-outline-primary span[id^="dynamic-delivery"] {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* ── FIX: Binding scroll affordance — gradient fade hint ── */
    .binding-scroll-row {
        position: relative;
        -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
        mask-image: linear-gradient(to right, black 80%, transparent 100%);
    }

    /* Remove mask once user has scrolled (JS adds this class) */
    .binding-scroll-row.scroll-end {
        -webkit-mask-image: linear-gradient(to left, black 80%, transparent 100%);
        mask-image: linear-gradient(to left, black 80%, transparent 100%);
    }

    .binding-scroll-row.scroll-middle {
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 80%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 10%, black 80%, transparent 100%);
    }

    .binding-scroll-row.scroll-done {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* Mobile Portrait Specific (Very Small Phones only - below 360px) */
@media (max-width: 359.98px) {

    /* Even tighter spacing for very small phones */
    .container {
        padding-left: max(1rem, env(safe-area-inset-left)) !important;
        padding-right: max(1rem, env(safe-area-inset-right)) !important;
    }

    /* Stack delivery/pickup buttons vertically ONLY on very small screens */
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 0.75rem !important;
        width: 100%;
    }

    /* Table mobile optimization */
    .table {
        font-size: 0.875rem;
    }
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.animate-slide-up {
    animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Gradient backgrounds for special cards */
/* Gradient backgrounds for special cards */
.bg-gradient-primary-to-teal {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

/* Decorative Blobs Base Styles - Desktop */
.blob-decoration-1 {
    width: 300px;
    height: 300px;
    z-index: 0;
}

.blob-decoration-2 {
    width: 200px;
    height: 200px;
    z-index: 0;
}

/* Mobile responsive blob scaling */
@media (max-width: 991.98px) {
    .blob-decoration-1 {
        width: 180px;
        height: 180px;
        opacity: 0.6;
        /* Gently reduce opacity on mobile too */
    }

    .blob-decoration-2 {
        width: 120px;
        height: 120px;
        opacity: 0.6;
        margin-bottom: 2rem !important;
        /* Adjust bottom margin for smaller blob */
    }

    /* Map containers adjust height on mobile */
    .map-container {
        height: 250px !important;
    }
}

/* Animation Delights */
@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

.animate-entry {
    animation: slide-in-right 0.3s ease-out forwards;
}

/* ===========================================
   PARCEL MACHINE LIVE SEARCH DROPDOWN
   Accordion-based design with collapsible regions
   =========================================== */

.parcel-dropdown {
    position: relative;
}

.parcel-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: white;
    border: 2px solid var(--bs-primary);
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 20px 40px -10px rgba(22, 163, 74, 0.15),
        0 10px 20px -5px rgba(0, 0, 0, 0.1);
    max-height: 60vh;
    overflow: hidden;
}

.parcel-results-inner {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom scrollbar for parcel results */
.parcel-results-inner::-webkit-scrollbar {
    width: 8px;
}

.parcel-results-inner::-webkit-scrollbar-track {
    background: var(--slate-50);
    border-radius: 4px;
}

.parcel-results-inner::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
}

.parcel-results-inner::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* Recently Used Section */
.parcel-recent-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-bottom: 2px solid var(--bs-primary);
    padding: 0.75rem;
}

.parcel-recent-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
}

.parcel-recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid rgba(22, 163, 74, 0.2);
    cursor: pointer;
    transition: all 0.15s ease;
}

.parcel-recent-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.15);
    transform: translateY(-1px);
}

.parcel-recent-item i {
    color: var(--bs-primary);
    font-size: 1.25rem;
}

.parcel-recent-info {
    flex: 1;
    min-width: 0;
}

.parcel-recent-name {
    font-weight: 600;
    color: var(--slate-800);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.parcel-recent-address {
    font-size: 0.75rem;
    color: var(--slate-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Collapsible Region Headers (Accordion) */
.parcel-region-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--slate-100) 0%, var(--slate-50) 100%);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-700);
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid var(--slate-200);
    transition: all 0.2s ease;
    position: relative;
}

.parcel-region-header:hover {
    background: linear-gradient(135deg, var(--slate-200) 0%, var(--slate-100) 100%);
}

.parcel-region-header.expanded {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}

.parcel-region-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.2s ease;
}

.parcel-region-header.expanded::before {
    background: var(--bs-primary);
}

.parcel-region-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parcel-region-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.parcel-region-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    background: white;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--slate-600);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.parcel-region-header.expanded .parcel-region-count {
    background: var(--bs-primary);
    color: white;
}

.parcel-region-chevron {
    font-size: 0.875rem;
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.parcel-region-header.expanded .parcel-region-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* Region Content (Collapsible) */
.parcel-region-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    background: white;
}

.parcel-region-content.expanded {
    max-height: 2000px;
    /* Large enough to fit all items, animation will handle it */
    overflow: visible;
}

/* Machine Items */
.parcel-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.875rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid var(--slate-100);
    transition: all 0.15s ease;
    position: relative;
}

.parcel-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.15s ease;
}

.parcel-item:hover {
    background: linear-gradient(90deg, #f0fdf4 0%, white 100%);
}

.parcel-item:hover::before {
    background: var(--bs-primary);
}

.parcel-item.active {
    background: linear-gradient(90deg, #dcfce7 0%, #f0fdf4 100%);
}

.parcel-item.active::before {
    background: var(--bs-primary);
}

.parcel-item:last-child {
    border-bottom: none;
}

.parcel-item-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-100);
    border-radius: 0.5rem;
    color: var(--slate-500);
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.parcel-item:hover .parcel-item-icon {
    background: var(--bs-primary);
    color: white;
}

.parcel-item-details {
    flex: 1;
    min-width: 0;
}

.parcel-item-name {
    font-weight: 600;
    color: var(--slate-800);
    font-size: 0.95rem;
    line-height: 1.3;
}



.parcel-item-address {
    font-size: 0.8rem;
    color: var(--slate-500);
    margin-top: 0.125rem;
    line-height: 1.4;
}



/* No Results State */
.parcel-no-results {
    padding: 2rem;
    text-align: center;
}

.parcel-no-results i {
    font-size: 2rem;
    color: var(--slate-300);
    margin-bottom: 0.75rem;
    display: block;
}

/* Chevron rotation for main input */
.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

#parcelChevron {
    transition: transform 0.2s ease;
    pointer-events: none;
}

/* Selected machine display */
.selected-machine {
    animation: fade-in-up 0.3s ease;
}

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

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

/* Mobile optimization for parcel dropdown */
@media (max-width: 767.98px) {
    .parcel-results {
        max-height: 350px;
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 80px;
        border: 2px solid var(--bs-primary);
        border-radius: 1rem;
    }

    .parcel-results-inner {
        max-height: 350px;
    }

    .parcel-region-header {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .parcel-item {
        padding: 1rem 1rem 1rem 1.25rem;
    }

    .parcel-item-name {
        font-size: 1rem;
    }

    .parcel-item-address {
        font-size: 0.85rem;
    }

    .parcel-recent-item {
        padding: 1rem;
    }
}

/* ===========================================
   HOMEPAGE UX/UI IMPROVEMENTS
   =========================================== */

/* Location Switcher Enhancement - Clear Clickable Indicator */
.location-item:not(.active)::after {
    content: "→ Click to view";
    font-size: 0.75rem;
    color: var(--slate-400);
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.location-item:not(.active):hover::after {
    opacity: 1;
}

.location-item .bi-geo-alt-fill {
    transition: transform 0.2s ease;
}

.location-item:hover .bi-geo-alt-fill {
    transform: scale(1.15);
}

/* Location Email Links - Improved Accessibility & Contrast */
.location-email-link {
    color: white !important;
    text-decoration: underline;
    text-decoration-color: #059669;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.location-email-link:hover {
    text-decoration-color: #10b981;
    transform: translateX(2px);
}

/* Map Filter - Brand-Aligned Desaturation */
#locationMap {
    filter: saturate(0.65) brightness(0.92) contrast(1.05);
    transition: filter 0.3s ease;
}

#locationMap:hover {
    filter: saturate(0.75) brightness(0.95) contrast(1.05);
}

/* ===========================================
   VALUE STRIP - Compact feature row
   =========================================== */

.value-strip {
    background-color: var(--slate-50);
    border-color: var(--slate-200) !important;
}

.value-strip-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1rem 0;
}

.value-strip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    font-size: 0.95rem;
}

.value-strip-item i {
    font-size: 1.1rem;
}

.value-strip-divider {
    width: 1px;
    height: 1.25rem;
    background-color: var(--slate-200);
    flex-shrink: 0;
}

/* ===========================================
   THESIS SECTION - Full-width hero
   =========================================== */

.thesis-section {
    position: relative;
    overflow: hidden;
    background: #f0fdf4;
}

.thesis-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-on-surface);
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.thesis-pill i {
    color: var(--text-on-surface);
}

.thesis-storefront-img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.thesis-price {
    font-size: 2.25rem;
    line-height: 1.2;
}

.thesis-volume-line {
    border-top: 1px solid rgba(5, 150, 105, 0.12);
    font-size: 0.95rem;
}

/* Value Strip + Thesis Section mobile */
@media (max-width: 991.98px) {
    .value-strip-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .value-strip-item {
        flex: 0 0 calc(50% - 1rem);
        justify-content: center;
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    .value-strip-divider {
        display: none;
    }

    .thesis-price {
        font-size: 1.75rem;
    }

    .thesis-storefront-img {
        margin-top: 1rem;
    }
}

/* Mobile Optimizations for New Styles */
@media (max-width: 991.98px) {
    .location-item:not(.active)::after {
        content: "→";
        font-size: 1.25rem;
    }
}

/* Map Dark Mode Filter */
.map-dark-mode {
    filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%) grayscale(20%);
    -webkit-filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%) grayscale(20%);
}

/* Utility Extras */
.hover-opacity-100:hover {
    opacity: 1 !important;
}

/* Custom Quote Page - Drag & Drop Zone */
.quote-drag-zone {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background-color: var(--slate-50);
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%23CBD5E1FF' stroke-width='2' stroke-dasharray='12%2c 12' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.quote-drag-zone:hover,
.quote-drag-zone:focus-visible,
.quote-drag-zone.dragover {
    background-color: var(--green-subtle);
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%23059669FF' stroke-width='3' stroke-dasharray='0' stroke-linecap='square'/%3e%3c/svg%3e");
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
    outline: none;
}

.quote-drag-zone i {
    transition: transform 0.2s ease;
}

.quote-drag-zone:hover i,
.quote-drag-zone.dragover i {
    transform: scale(1.1);
}

/* Quote File Preview Items */
.quote-file-item {
    transition: all 0.2s ease;
    animation: slideIn 0.2s ease-out;
}

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

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

.quote-file-item:hover {
    background-color: var(--slate-50) !important;
    transform: translateX(3px);
}

.quote-file-item button {
    transition: all 0.2s ease;
}

.quote-file-item button:hover {
    transform: scale(1.1);
}

/* Quote Why Section (Left Column) */
.quote-why-section {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05) 0%, rgba(5, 150, 105, 0.01) 100%);
    border-radius: 1rem;
    padding: 2rem;
}

.quote-why-section h2 {
    color: var(--slate-900);
    margin-bottom: 1.5rem;
}

.quote-why-section ul {
    list-style: none;
    padding: 0;
}

.quote-why-section ul li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
    color: var(--slate-700);
}

.quote-why-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--bs-primary);
    font-weight: bold;
    font-size: 1.25rem;
}

@media (max-width: 991.98px) {
    .quote-drag-zone {
        padding: 1.5rem 1rem;
    }

    .quote-why-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* No Spinners for Number Inputs */
.no-spinners::-webkit-outer-spin-button,
.no-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinners {
    -moz-appearance: textfield;
}

/* Price Flash Animation */
@keyframes price-flash {
    0% {
        color: var(--bs-primary);
        transform: scale(1);
    }

    50% {
        color: var(--orange-dark);
        transform: scale(1.1);
    }

    100% {
        color: var(--bs-primary);
        transform: scale(1);
    }
}

.price-flash {
    animation: price-flash 0.4s ease-out;
    display: inline-block;
}

/* Receipt row — replaces Bootstrap d-flex which uses !important and blocks display:none toggling */
.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.35rem 0;
}

.receipt-row.receipt-sub {
    font-size: 0.85rem;
    padding: 0.15rem 0 0.15rem 0.5rem;
}

/* ===========================================
   ACCESSIBILITY IMPROVEMENTS
   Unified Emerald Focus Rings
   =========================================== */

/* Accessibility: Focus indication for custom radio cards */
.custom-card-radio input:focus-visible+.custom-card-label {
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.25);
    border-color: var(--bs-primary);
    z-index: 1;
}

/* Accessibility: Focus indication for custom switches and standard checks */
.form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.25);
}

/* ===========================================
   APPLE-LIKE GLOBAL TIGHTENING
   Compact spacing across ALL pages
   =========================================== */

/* --- Bootstrap spacing utility overrides (desktop) --- */
/* py-5 → 2rem instead of 3rem */
.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* p-5 → 2rem instead of 3rem */
.p-5 {
    padding: 2rem !important;
}

/* pb-5 → 2rem */
.pb-5 {
    padding-bottom: 2rem !important;
}

/* g-5 row gap → 1.5rem instead of 3rem */
.row.g-5 {
    --bs-gutter-y: 1.5rem;
    --bs-gutter-x: 1.5rem;
}

/* g-4 row gap → 1rem instead of 1.5rem */
.row.g-4 {
    --bs-gutter-y: 1rem;
    --bs-gutter-x: 1rem;
}

/* mb-4 → 1rem instead of 1.5rem */
.mb-4 {
    margin-bottom: 1rem !important;
}

/* mb-5 → 1.5rem instead of 3rem */
.mb-5 {
    margin-bottom: 1.5rem !important;
}

/* mt-5 → 1.5rem */
.mt-5 {
    margin-top: 1.5rem !important;
}

/* my-4 dividers → 1rem */
hr.my-4 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* --- Hero sections (all pages) --- */
.container.text-center h1 {
    margin-bottom: 0.375rem !important;
}

.container.text-center .lead {
    font-size: 0.95rem;
}

/* Deadline badge — smaller */
#deadlineContainer {
    padding: 0.375rem 0.875rem !important;
    font-size: 0.85rem;
}

/* --- Card body/header padding overrides --- */
.card-body.p-4 {
    padding: 1.25rem !important;
}

.card-body.p-5 {
    padding: 1.5rem !important;
}

.card-header.p-4 {
    padding: 0.875rem 1.25rem !important;
}

/* Configuration panel */
.p-4.bg-white {
    padding: 1.25rem !important;
}

#fileListContainer.p-4 {
    padding: 1rem 1.25rem !important;
}

/* --- Upload zone internals --- */
.upload-zone .rounded-circle {
    padding: 0.75rem !important;
}

.upload-zone .fs-1 {
    font-size: 1.5rem !important;
}

.upload-zone h5 {
    margin-bottom: 0.25rem !important;
}

.upload-zone p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem !important;
}

/* --- Custom card labels --- */
.custom-card-label.p-3 {
    padding: 0.625rem !important;
}

/* --- Accordion body --- */
.accordion-body {
    padding: 1rem;
}

/* --- Receipt card --- */
.card-header h5 {
    font-size: 0.95rem;
}

.card-body .alert.mb-4 {
    margin-bottom: 0.75rem !important;
    padding: 0.5rem 0.75rem;
}

/* --- Buttons with py-2/py-3 --- */
.btn.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.btn.py-3 {
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
}

/* --- Quote page drag zone icon --- */
.quote-drag-zone .fs-1 {
    font-size: 1.5rem !important;
}

.quote-drag-zone h5 {
    font-size: 1rem;
}

/* --- Sticky sidebar --- */
.sticky-top .mb-4 {
    margin-bottom: 1rem !important;
}

/* --- Heading sizes (all pages) --- */
/* Keep Bootstrap defaults — tightening is spacing, not font sizes */

/* --- Footer --- */
footer.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* ===========================================
   SECTION DIVIDERS — Visual rhythm inside config panel
   =========================================== */

#advancedOptions {
    border-top: 1px solid var(--slate-200);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

#deliverySettings {
    border-top: 1px solid var(--slate-200);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

/* ===========================================
   PROGRESSIVE DISCLOSURE
   Smooth reveal animation for form sections
   =========================================== */

@keyframes reveal-section {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.animate-reveal {
    animation: reveal-section 0.35s ease-out forwards;
}

/* ===========================================
   WIZARD STEP LAYOUT
   =========================================== */

/* Step enter animation */
@keyframes wizard-step-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

.wizard-step-active {
    animation: wizard-step-in 0.3s ease-out forwards;
}

/* Progress bar labels */
.wizard-progress-bar {
    background: white;
    border-bottom: 1px solid var(--slate-100);
}

.wizard-steps-labels {
    padding: 0 0.25rem;
}

.wizard-step-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
    cursor: default;
}

.wizard-step-label.active {
    color: var(--bs-primary);
}

.wizard-step-label.completed {
    color: var(--slate-600);
}

/* Step nav footer */
.wizard-step-nav {
    background: white;
}

/* Review summary card rows */
.review-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--slate-50);
    border-radius: 0.5rem;
    border: 1px solid var(--slate-100);
}

.review-row .review-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 90px;
    flex-shrink: 0;
    padding-top: 2px;
}

.review-row .review-value {
    font-weight: 600;
    color: var(--slate-900);
    font-size: 0.95rem;
}

/* Ticket 5: Binding horizontal scroll on mobile */
@media (max-width: 767.98px) {
    .binding-scroll-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 0.5rem !important;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .binding-scroll-row>.col-6.col-sm-4.col-lg {
        flex: 0 0 160px !important;
        max-width: 160px !important;
        width: 160px !important;
        scroll-snap-align: start !important;
    }

    /* "Magic Detected" badge on page count */
    .page-magic-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: #15803d;
        background: #dcfce7;
        border-radius: 2rem;
        padding: 0.2rem 0.6rem;
        animation: fadeIn 0.3s ease-in;
        cursor: pointer;
    }
}

/* ===========================================
   OMNIVA MOBILE FULL-SCREEN MODAL (Ticket 4)
   Only activated on < 992px via JS
   =========================================== */

.omniva-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: flex-end;
    /* Sheet slides up from bottom */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.omniva-modal:not(.d-none) {
    pointer-events: auto;
}

.omniva-modal.omniva-modal-open {
    opacity: 1;
}

.omniva-modal-inner {
    width: 100%;
    background: white;
    border-radius: 1.25rem 1.25rem 0 0;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.omniva-modal.omniva-modal-open .omniva-modal-inner {
    transform: translateY(0);
}

.omniva-modal-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--slate-200);
    flex-shrink: 0;
    gap: 0.5rem;
}

.omniva-modal-header .form-control {
    font-size: 1rem;
    min-height: 44px;
}

.omniva-modal-close {
    flex-shrink: 0;
    min-height: 44px;
    min-width: 44px;
}

.omniva-modal-results {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Larger touch targets for modal list items */
.omniva-modal-results .parcel-item {
    padding: 1rem 1rem 1rem 1.5rem;
    min-height: 56px;
}

.omniva-modal-results .region-header {
    padding: 1rem;
    font-size: 0.9rem;
    min-height: 50px;
}

/* Hero storefront image */
.hero-storefront {
    transition: transform 0.3s ease;
}
.hero-storefront:hover {
    transform: scale(1.02);
}

/* ===========================================
   REDUCED MOTION
   Respect user's motion preferences (WCAG 2.1 SC 2.3.3)
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}