﻿:root {
    --primary: #1565C0;
    --primary-dark: #0D47A1;
    --primary-light: #e3f0fd;
    --secondary: #42A5F5;
    --bg-main: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(21, 101, 192, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.w-100 {
    width: 100% !important;
}

/* Navbar */
.navbar {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.25rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .logo-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 428px) {
    .logo-text {
        display: none;
    }
}

/* ── Industry context pill (populated by components.js) ── */
.ind-context {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
    margin-right: auto;
    padding: 4px 5px 4px 12px;
    background: var(--primary-light);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: var(--primary);
    max-width: 340px;
}
.ind-context.show { display: inline-flex; }
.ind-context-ico { font-size: 15px; line-height: 0; flex-shrink: 0; }
.ind-context-pre { color: var(--text-muted); white-space: nowrap; }
.ind-context-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}
.ind-context-change {
    margin-left: 2px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    transition: background 0.15s;
}
.ind-context-change:hover { background: #fff; }
.ind-context-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    line-height: 0;
    flex-shrink: 0;
    transition: background 0.15s;
}
.ind-context-reset:hover { background: rgba(0, 0, 0, 0.08); }

@media (max-width: 768px) {
    .ind-context {
        margin-left: 10px;
        padding: 4px 5px 4px 10px;
        font-size: 14px;
        max-width: 58vw;
    }
    .ind-context-pre,
    .ind-context-change { display: none; }
    .ind-context-label { max-width: 120px; }
}
@media (max-width: 380px) {
    .ind-context-label { max-width: 78px; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Drawer zones, on desktop the wrappers vanish so links stay in the row */
.nav-drawer-head { display: none; }
.nav-drawer-body,
.nav-drawer-foot { display: contents; }

/* ── Hamburger button ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.22s;
}
.navbar.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }     /* hamburger shows; the open drawer covers it */
    .navbar {
        z-index: 200;                  /* lifts the navbar (and the drawer inside it) above page content */
        background: #fff;
        backdrop-filter: none;            /* don't create a containing block for the fixed drawer */
        -webkit-backdrop-filter: none;
    }
    /* lock background scroll while the drawer is open (mobile only) */
    body.nav-open { overflow: hidden; }

    /* Full-screen off-canvas drawer, slides in from the right */
    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        overflow: hidden;          /* the drawer itself never scrolls; only its body does */
        transform: translateX(100%);
        transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 300;              /* above the navbar so its logo/hamburger hide behind it */
    }
    .navbar.open .nav-links {
        transform: translateX(0);
    }

    /* fixed header: logo (left) + close (right) */
    .nav-drawer-head {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: space-between;
        padding: 16px 24px 14px;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-drawer-logo { line-height: 0; }
    .nav-drawer-logo img { height: 28px; display: block; }
    .nav-drawer-close {
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        font-size: 26px;
        line-height: 1;
        color: var(--text-main);
        display: flex;
    }

    /* scrollable middle */
    .nav-drawer-body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        align-items: stretch;
        min-height: 0;             /* allow the flex child to shrink so overflow works */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 24px 8px;
    }

    /* fixed footer: Contact CTA */
    .nav-drawer-foot {
        display: block;
        flex: 0 0 auto;
        padding: 14px 24px 22px;
        border-top: 1px solid var(--border-color);
        background: #fff;
    }

    .nav-link {
        font-size: 17px;
        padding: 17px 2px;
        border-bottom: 1px solid var(--border-color);
    }
    .btn-login {
        text-align: center;
        display: block;
        padding: 15px 24px;
        font-size: 16px;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-login {
    text-decoration: none;
    background: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 700;
    transition: transform 0.3s, background 0.3s;
}

.btn-login:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}

.badge {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bg-primary {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.5;
}

/* Search Box */
.search-box-wrapper {
    max-width: 600px;
    margin: 20px auto 0;
    position: relative;
}

.search-box {
    background: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-icon {
    font-size: 1.25rem;
    color: #94a3b8;
}

.search-clear {
    position: absolute;
    right: 20px;
    font-size: 1.25rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s;
}

.search-clear:hover {
    color: #64748b;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 500;
}

@media (max-width: 576px) {
    .search-box input {
        font-size: .8rem;
    }
}

.search-results-overlay {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    display: none;
}

.result-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.result-item:hover {
    background: #f8fafc;
}

/* Discovery Section */
.discovery-section {
    padding-top: 40px;
    padding-bottom: 80px;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.nav-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.btn-back {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.category-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-card:hover {
    border-color: #0369a1;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(3, 105, 161, 0.1) 0%, rgba(8, 145, 178, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 0;
    display: block;
    background: linear-gradient(135deg, #0369a1 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.card-label {
    font-weight: 600;
    color: #334155;
    font-size: 1rem;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

/* Active State for Cards */
.category-card.active {
    border-color: #0369a1;
    background: #f0f9ff;
}

.selection-indicator {
    margin-left: auto;
    color: #0369a1;
    font-size: 1.25rem;
    display: none;
    position: relative;
    z-index: 1;
}

.category-card.active .selection-indicator {
    display: block;
}

/* Grouped Layout Styles */
.grouped-item-list {
    width: 100%;
}

.category-group {
    margin-bottom: 30px;
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.05em;

    position: sticky;
    top: calc(72px + 87px);
    z-index: 99;
}

.group-header i {
    font-size: 1.25rem;
    background: linear-gradient(135deg, #0369a1 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.group-header .active i,
.group-header .select-all-btn:hover i {
    background: #fff;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-bg {
    background: #f2f5f9;
    border-left: 4px solid #0369a1;
    margin-top: 20px;
    margin-bottom: 15px;
}

.select-all-btn {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid #0369a1;
    color: #0369a1;
    background: transparent;
    transition: all 0.2s;
    text-transform: none;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.select-all-btn:hover,
.select-all-btn.active {
    background: #0369a1;
    color: white;
}

.select-sub-all-btn {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0369a1;
    padding: 0 5px;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}

.select-sub-all-btn:hover {
    color: #075985;
}

.subgroup-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 5px;
    margin-bottom: 15px;

    /* Sticky fixes - Keep background but restore margin */
    background: var(--bg-main);

    position: sticky;
    top: calc(72px + 60px + 85px);
    z-index: 98;
}

.subgroup-header span {
    font-weight: 600;
    color: #64748b;
    font-size: 0.95rem;
    white-space: nowrap;
}

.header-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Sub-category card adjustments */
.sub-cat-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 15px 20px;
}

.sub-cat-card .selection-indicator {
    position: absolute;
    top: 10px;
    right: 15px;
}

/* Selection Item */
.selection-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.selection-item:hover {
    border-color: #0369a1;
    background: #f8fafc;
}

.selection-item.selected {
    border-color: #0369a1;
    background: #f0f9ff;
}

.item-info {
    flex: 1;
}

.item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.item-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.3;
}

.selection-item i {
    font-size: 1.25rem;
    color: #cbd5e1;
}

.selection-item.selected i {
    color: #10b981;
}

/* Modal and Animations kept same as before but ensured they don't break */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 40px;
    width: 90%;
    max-width: 450px;
    border-radius: 24px;
    position: relative;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 24px;
}

.modal-actions {
    display: grid;
    gap: 12px;
    margin-top: 25px;
}

.btn-primary-large {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
}

.btn-secondary-large {
    background: #f1f5f9;
    color: var(--text-main);
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Main Footer */
.main-footer {
    padding: 60px 0 28px;
    font-size: 14px;
    color: #94a3b8;
    background: #0f172a;
}
.footer-cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}
.footer-brand .footer-logo { display: inline-block; line-height: 0; margin-bottom: 16px; }
.footer-brand .footer-logo img { height: 26px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 14px; line-height: 1.65; color: #94a3b8; margin: 0 0 18px; max-width: 320px; }
.footer-wa {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; color: #25D366; text-decoration: none;
    transition: opacity .15s;
}
.footer-wa:hover { opacity: .8; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-head {
    font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
    color: #f1f5f9; margin-bottom: 6px;
}
.footer-col a { color: #94a3b8; text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: #60a5fa; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 22px; text-align: center; font-size: 13.5px; color: #64748b;
}
.footer-bottom p { margin: 0; }
@media (max-width: 860px) {
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-cols { grid-template-columns: 1fr; }
}

/* Wizard Header Refinement */
.wizard-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);

    position: sticky;
    top: 72px;
    z-index: 100;
}

.top-nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 20px; */
}

.header-titles h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 40px;
    text-align: center;
}

.header-titles p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.step-progress {
    /* margin-bottom: 24px; */
    display: flex;
    justify-content: center;
}

/* Selected Items Bar in Header */
.selected-items-bar {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 12px;
    /* margin-bottom: 24px; */
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-sm {
    padding: 10px 18px !important;
    font-size: 0.85rem !important;
}

.btn-lg {
    padding: 16px 40px !important;
    font-size: 1.1rem !important;
}

/* Step Dots */
.step-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 50%;
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.25);
}

/* Buttons */
.btn-primary-action,
.btn-success-sm {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-action:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary-outline:hover:not(:disabled) {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-secondary-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bottom-actions  {
    margin-top: 20px;
    position: fixed;
    z-index: 100;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: white;
    .btn-primary-action {
        width: 100%;
    }
}

/* --- Responsiveness & Mobile Optimizations --- */

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .wizard-header {
        padding: 16px;
        top: 68px;
        /* Adjust sticky top if navbar height changes */
    }

    .header-titles h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .category-grid,
    .secondary-grid,
    .item-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 576px) {

    /* Global Font Reductions */
    body {
        font-size: 14px;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    /* Hero Section */
    .hero-section {
        padding: 40px 0 20px;
    }

    .main-title {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    /* Headers */
    .nav-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }

    .nav-header h2 {
        font-size: 1.5rem;
    }

    .wizard-header {
        padding: 15px;
        top: 60px;
        /* Tighter sticky positioning */
    }

    .group-header {
        top: calc(60px + 69px);
        /* Recalculate sticky offsets */
        font-size: 1rem;
    }

    .subgroup-header {
        top: calc(60px + 60px + 66px);
    }

    .header-titles h2 {
        font-size: 1.35rem;
        margin-bottom: 20px;
    }

    /* Grids to Single Column */
    .category-grid,
    .secondary-grid,
    .item-grid {
        grid-template-columns: 1fr;
        /* Force single column */
    }

    /* Cards & Items */
    .category-card {
        padding: 12px 15px;
    }

    .card-icon {
        font-size: 1.25rem;
    }

    .card-label {
        font-size: 0.95rem;
    }

    .selection-item {
        padding: 10px 12px;
    }

    .item-title {
        font-size: 0.9rem;
    }

    .item-desc {
        font-size: 0.75rem;
    }

    /* Buttons */
    .btn-primary-action,
    .btn-secondary-outline {
        padding: 10px 16px;
        font-size: 0.9rem;
        /* width: 100%; */
        /* Full width buttons on mobile */
        justify-content: center;
    }

    .top-nav-controls {
        gap: 10px;
    }

    .top-nav-controls button span {
        display: none;
        /* Hide text "Cancel"/"Next" if space is tight? Maybe just generic "Back" */
    }
}

/* Sticky State Overrides
   Cosmetic only (shadow). NO size/width/padding changes here:
   altering the box while measuring it on scroll caused a reflow
   feedback loop that flickered the sticky header. */
.wizard-header.is-stuck,
.group-header.is-stuck,
.subgroup-header.is-stuck {
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.18);
    transition: box-shadow 0.2s ease;
}

/* ============================================================
   FEATURES MEGA-DROPDOWN (global nav)
   ============================================================ */
.nav-dd { position: relative; }
.nav-dd-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; font-family: inherit;
    font-size: 1rem; font-weight: 600; color: var(--text-muted);
    cursor: pointer; padding: 0;
}
.nav-dd-toggle i { font-size: 14px; transition: transform .2s; }
.nav-dd:hover .nav-dd-toggle,
.nav-dd.open .nav-dd-toggle { color: var(--primary); }
.nav-dd:hover .nav-dd-toggle i,
.nav-dd.open .nav-dd-toggle i { transform: rotate(180deg); }

.nav-dd-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(186px, 1fr));
    gap: 26px;
    width: max-content;
    max-width: 92vw;
    z-index: 200;
    /* Hidden by default; revealed on hover after a short intent delay so the
       menu doesn't pop the instant the cursor grazes the toggle. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-dd-menu::before {
    content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px;
}
.nav-dd:hover .nav-dd-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition-delay: .22s; /* open after delay; closing stays instant */
}

.nav-dd-col { display: flex; flex-direction: column; gap: 2px; }
.nav-dd-head {
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--text-muted);
    margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.nav-dd-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 9px; text-decoration: none;
    color: var(--text-main); font-size: 14px; font-weight: 600;
    transition: background .15s, color .15s;
}
.nav-dd-link:hover { background: var(--primary-light); color: var(--primary); }
.nav-dd-link i { font-size: 16px; color: var(--primary); width: 18px; text-align: center; flex-shrink: 0; }
.nav-dd-link.disabled { color: var(--text-muted); cursor: default; }
.nav-dd-link.disabled:hover { background: transparent; color: var(--text-muted); }
.nav-dd-link.disabled i { color: #cbd5e1; }
.dd-soon {
    margin-left: auto; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px; background: #fef3c7; color: #92400e;
    padding: 2px 7px; border-radius: 20px;
}

@media (max-width: 768px) {
    .nav-dd { width: 100%; }
    .nav-dd-toggle {
        width: 100%; justify-content: space-between;
        font-size: 17px; padding: 17px 2px;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-dd-menu {
        position: static; transform: none; display: none;
        opacity: 1; visibility: visible; pointer-events: auto; transition: none;
        grid-template-columns: 1fr; gap: 14px;
        border: none; box-shadow: none; padding: 6px 0 10px;
        width: 100%; max-width: none;
    }
    .nav-dd:hover .nav-dd-menu { display: none; }
    .nav-dd.open .nav-dd-menu { display: grid; }
    .nav-dd-menu::before { display: none; }
}