/* =============================================================================
   MODERN SIDEBAR STYLES - SAGA Application
   Matches website theme: Primary #81C408, Secondary #FFB524
   ============================================================================= */

/* Sidebar Container */
.sidebar,
.homepagesidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 85px;
    height: 100vh;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F6F8 100%);
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-right: 2px solid #81C408;
}

/* Inner scrollable wrapper */
.sidebar-inner {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5rem 0.5rem;
}

.sidebar:hover,
.homepagesidebar:hover {
    width: 270px;
}

/* Sidebar Logo/Brand Area */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #81C408;
}

.sidebar-brand i {
    font-size: 2.2rem;
    color: #81C408;
    transition: all 0.3s ease;
}

.sidebar:hover .sidebar-brand i,
.homepagesidebar:hover .sidebar-brand i {
    transform: rotate(15deg) scale(1.1);
    color: #FFB524;
}

.sidebar-brand-text {
    margin-left: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #45595B;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sidebar:hover .sidebar-brand-text,
.homepagesidebar:hover .sidebar-brand-text {
    opacity: 1;
    max-width: 200px;
}

/* Sidebar Content Wrapper */
.sidebar ul,
.homepagesidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar ul li,
.homepagesidebar ul li {
    margin: 0.75rem 0;
}

/* Sidebar Divider */
.sidebar-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #81C408, transparent);
    margin: 1rem 0;
    border-radius: 2px;
}

/* Sidebar Links and Paragraphs */
.sidebar ul li a,
.sidebar ul li p,
.homepagesidebar ul li a,
.homepagesidebar ul li p {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #45595B;
    padding: 0.9rem 0.8rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.sidebar ul li p,
.homepagesidebar ul li p {
    margin-bottom: 0;
}

/* Icons */
.sidebar ul li a i,
.sidebar ul li p i,
.homepagesidebar ul li a i,
.homepagesidebar ul li p i {
    font-size: 1.6rem;
    min-width: 45px;
    text-align: center;
    transition: all 0.3s ease;
    color: #81C408;
}

/* Hover Effects */
.sidebar ul li a:hover,
.sidebar ul li p:hover,
.homepagesidebar ul li a:hover,
.homepagesidebar ul li p:hover {
    background: linear-gradient(135deg, #81C408 0%, #6FAF08 100%);
    color: white;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(129, 196, 8, 0.3);
}

.sidebar ul li a:hover i,
.sidebar ul li p:hover i,
.homepagesidebar ul li a:hover i,
.homepagesidebar ul li p:hover i {
    transform: scale(1.15);
    color: white;
}

/* Active State */
.sidebar ul li a.active,
.homepagesidebar ul li a.active {
    background: linear-gradient(135deg, #FFB524 0%, #FFA500 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 181, 36, 0.4);
}

.sidebar ul li a.active i,
.homepagesidebar ul li a.active i {
    color: white;
}

.sidebar ul li a.active::before,
.homepagesidebar ul li a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

/* Text Labels - Hidden by default, shown on hover */
.sidebar ul li a span,
.sidebar ul li p span,
.homepagesidebar ul li a span,
.homepagesidebar ul li p span {
    opacity: 0;
    max-width: 0;
    margin-left: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
}

.sidebar:hover ul li a span,
.sidebar:hover ul li p span,
.homepagesidebar:hover ul li a span,
.homepagesidebar:hover ul li p span {
    opacity: 1;
    max-width: 200px;
    margin-left: 0.8rem;
}

/* Search Wrapper */
.sidebar-search-wrapper {
    position: relative;
    width: 100%;
    background: #F4F6F8;
    border-radius: 25px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    margin: 0.8rem 0;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.sidebar:hover .sidebar-search-wrapper,
.homepagesidebar:hover .sidebar-search-wrapper {
    opacity: 1;
    max-width: 250px;
}

.sidebar-search-wrapper:focus-within {
    border-color: #81C408;
    box-shadow: 0 0 0 3px rgba(129, 196, 8, 0.1);
}

/* Search Input */
.sidebar-search-input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #45595B;
    border-radius: 25px;
}

.sidebar-search-input::placeholder {
    color: #6c757d;
}

.sidebar-search-input:focus {
    outline: none;
    background: white;
}

/* Search Button */
.sidebar-search-btn {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #81C408 0%, #6FAF08 100%);
    box-shadow: 0 2px 6px rgba(129, 196, 8, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-search-btn i {
    color: white;
    font-size: 0.9rem;
}

.sidebar-search-btn:hover {
    background: linear-gradient(135deg, #6FAF08 0%, #5A9006 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 10px rgba(129, 196, 8, 0.4);
}

.sidebar-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Mobile Sidebar Toggle Button -
   Sibling to the <nav>, positioned via CSS next-sibling selector when open */
#sidebarToggle,
#homesidebarToggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #81C408 0%, #6FAF08 100%);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    padding: 14px 8px;
    width: 26px;
    height: 60px;
    z-index: 1150;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 3px 2px 10px rgba(129, 196, 8, 0.5);
    overflow: hidden;
}

#sidebarToggle:hover,
#homesidebarToggle:hover {
    background: linear-gradient(180deg, #FFB524 0%, #FFA500 100%);
    box-shadow: 3px 2px 14px rgba(255, 181, 36, 0.6);
    width: 30px;
}

/* CSS-driven shift when sidebar is open — no JS needed for positioning */
.sidebar.open + #sidebarToggle,
.homepagesidebar.open + #homesidebarToggle {
    left: 270px;
}

#sidebarToggle i,
#homesidebarToggle i {
    font-size: 0.75rem;
    pointer-events: none;
}

/* Page Layout */
.page-layout {
    display: flex;
    min-height: 100vh;
}

.maincontent {
    margin-left: 85px;
    flex: 1;
    padding: 2rem;
    transition: margin-left 0.3s ease;
    width: calc(100% - 85px);
}

.homepagemaincontent {
    margin-left: 85px;
    width: calc(100% - 85px);
    transition: margin-left 0.3s ease;
}

/* Align fixed navbar content with sidebar-offset page content */
.container-fluid.fixed-top > .container {
    padding-left: 85px !important;
}

/* Smooth Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar ul li,
.homepagesidebar ul li {
    animation: slideIn 0.3s ease forwards;
}

.sidebar ul li:nth-child(1),
.homepagesidebar ul li:nth-child(1) { animation-delay: 0.05s; }
.sidebar ul li:nth-child(2),
.homepagesidebar ul li:nth-child(2) { animation-delay: 0.1s; }
.sidebar ul li:nth-child(3),
.homepagesidebar ul li:nth-child(3) { animation-delay: 0.15s; }
.sidebar ul li:nth-child(4),
.homepagesidebar ul li:nth-child(4) { animation-delay: 0.2s; }
.sidebar ul li:nth-child(5),
.homepagesidebar ul li:nth-child(5) { animation-delay: 0.25s; }
.sidebar ul li:nth-child(6),
.homepagesidebar ul li:nth-child(6) { animation-delay: 0.3s; }

/* Backdrop for mobile sidebar */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar,
    .homepagesidebar {
        transform: translateX(-100%);
        width: 270px;
    }
    
    .sidebar.open,
    .homepagesidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    
    .sidebar:hover,
    .homepagesidebar:hover {
        width: 270px;
    }
    
    .maincontent,
    .homepagemaincontent {
        margin-left: 0 !important;
        width: 100% !important;
        /* Space for the fixed bottom nav bar + iOS home bar */
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Footer also needs clearance above the bottom nav */
    .landing-footer {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Remove navbar offset — sidebar is hidden on mobile */
    .container-fluid.fixed-top > .container {
        padding-left: var(--bs-gutter-x, 0.75rem) !important;
    }
    
    /* Toggle button hidden on mobile — bottom nav replaces it */
    #sidebarToggle,
    #homesidebarToggle {
        display: none;
    }
    
    .sidebar-search-wrapper {
        opacity: 1;
        max-width: 250px;
    }
    
    .sidebar ul li a span,
    .sidebar ul li p span,
    .homepagesidebar ul li a span,
    .homepagesidebar ul li p span {
        opacity: 1;
        max-width: 200px;
        margin-left: 0.8rem;
    }
    
    .sidebar-brand-text {
        opacity: 1;
        max-width: 200px;
    }
}

/* Tablet Responsive */
@media (max-width: 992px) and (min-width: 769px) {
    .sidebar,
    .homepagesidebar {
        width: 75px;
    }
    
    .sidebar:hover,
    .homepagesidebar:hover {
        width: 240px;
    }
    
    .maincontent,
    .homepagemaincontent {
        margin-left: 75px;
        width: calc(100% - 75px);
    }

    /* Adjust navbar offset to match 75px sidebar width at tablet */
    .container-fluid.fixed-top > .container {
        padding-left: 75px !important;
    }
}

/* Account Details Sidebar Specific Styles */
.account-details-card .sidebar {
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F6F8 100%);
    border-right: 2px solid #81C408;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
}

.account-details-card .sidebar .nav-link {
    color: #45595B;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 0.95rem 1.2rem;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    margin: 0.4rem 0.8rem;
}

.account-details-card .sidebar .nav-link:hover {
    background: linear-gradient(135deg, #81C408 0%, #6FAF08 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(129, 196, 8, 0.3);
}

.account-details-card .sidebar .nav-link.active {
    background: linear-gradient(135deg, #FFB524 0%, #FFA500 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 181, 36, 0.4);
}

.account-details-card .sidebar .nav-link i {
    color: #81C408;
    font-size: 1.6rem;
    min-width: 45px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1 !important;
}

.account-details-card .sidebar .nav-link:hover i,
.account-details-card .sidebar .nav-link.active i {
    color: white;
    transform: scale(1.15);
}

.account-details-card .sidebar .nav-link span {
    margin-left: 0;
    opacity: 0;
    max-width: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.account-details-card .sidebar:hover .nav-link span {
    opacity: 1;
    max-width: 200px;
    margin-left: 0.8rem;
}

/* Content area adjustment for account details */
.account-details-card .content {
    margin-left: 85px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .account-details-card .sidebar {
        position: static;
        width: 100%;
        height: auto;
        box-shadow: none;
        padding: 10px 15px;
        transform: none;
    }
    
    .account-details-card .content {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .account-details-card .sidebar .nav-link span {
        opacity: 1;
        max-width: 200px;
        margin-left: 0.8rem;
    }
}

/* ================================================================
   MOBILE BOTTOM NAVIGATION BAR
   Fixed bottom dock shown only on screens ≤768px.
   No impact on tablet or desktop layout.
   Layout (L→R): Meal Plan | Calories | [MIC] | Pantry | Cart
   ================================================================ */

/* Global: hidden on all screens by default */
.mob-bottom-nav {
    display: none;
}

@media (max-width: 768px) {

    /* ---- Show the bar on mobile ---- */
    .mob-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1200;
        pointer-events: none; /* children manage their own pointer events */
    }

    /* ---- Dark overlay behind expanded bar ---- */
    .mob-nav-overlay {
        position: fixed;
        inset: 0;
        bottom: 72px;
        background: transparent;
        transition: background 0.3s ease;
        pointer-events: none;
        z-index: 0;
    }

    .mob-bottom-nav.expanded .mob-nav-overlay {
        background: rgba(0, 0, 0, 0.38);
        pointer-events: auto;
    }

    /* ---- Slide-to-cancel hint (appears during recording) ---- */
    .mob-slide-cancel {
        position: absolute;
        bottom: calc(100% + 10px);
        /* starts centered, slides left on .visible */
        left: 50%;
        transform: translateX(calc(-50% + 0px)) translateY(14px);
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(220, 50, 40, 0.93);
        color: #fff;
        padding: 9px 22px;
        border-radius: 50px;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                    background 0.2s ease, box-shadow 0.2s ease;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 18px rgba(220, 50, 40, 0.38);
        z-index: 20;
    }

    /* Slide to the left of centre when visible */
    .mob-slide-cancel.visible {
        opacity: 1;
        pointer-events: auto; /* allow tap-to-cancel */
        /* shift left of the mic (roughly where the Calories/Plan buttons are) */
        transform: translateX(calc(-50% - 68px)) translateY(0);
    }

    /* Highlight when user's finger is inside the cancel zone */
    .mob-slide-cancel.danger {
        background: rgba(180, 28, 18, 0.97);
        box-shadow: 0 6px 22px rgba(180, 28, 18, 0.55);
        transform: translateX(calc(-50% - 68px)) translateY(0) scale(1.06);
    }

    .mob-slide-cancel i {
        font-size: 0.9rem;
        animation: mobTrashShake 0.5s ease-in-out infinite;
    }

    @keyframes mobTrashShake {
        0%, 100% { transform: rotate(0deg); }
        25%       { transform: rotate(-12deg); }
        75%       { transform: rotate(12deg); }
    }

    /* ---- Disable all long-press selection / callout across the entire bar ---- */
    .mob-bottom-nav,
    .mob-bottom-nav * {
        -webkit-user-select: none;
        -webkit-touch-callout: none; /* iOS: suppress long-press callout + magnifier */
        user-select: none;
    }

    /* ---- Main bar surface ---- */
    .mob-nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1.5px solid rgba(129, 196, 8, 0.22);
        padding: 10px 6px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.09);
        transition: background 0.3s ease, border-top-color 0.3s ease,
                    box-shadow 0.3s ease;
        pointer-events: auto;
        position: relative;
        z-index: 1;
    }

    /* Dark-glass style when expanded */
    .mob-bottom-nav.expanded .mob-nav-bar {
        background: rgba(18, 22, 38, 0.97);
        border-top-color: rgba(129, 196, 8, 0.42);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
    }

    /* ---- Individual nav cells ---- */
    .mob-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 3px;
        flex: 1;
        min-width: 0;
        text-decoration: none;
        color: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        border: none;
        background: none;
        padding: 6px 2px 4px;
        transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .mob-nav-item:active {
        transform: scale(0.88);
    }

    /* ---- Icon wrapper ---- */
    .mob-nav-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        color: #666;
        position: relative;
        transition: width 0.3s ease, height 0.3s ease, font-size 0.3s ease,
                    color 0.3s ease, background 0.3s ease, border-radius 0.3s ease;
    }

    /* Expanded: bigger icon boxes with green glass tint */
    .mob-bottom-nav.expanded .mob-nav-icon {
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
        color: rgba(255, 255, 255, 0.92);
        background: rgba(129, 196, 8, 0.16);
        border-radius: 14px;
    }

    /* ---- Labels: always visible (small but readable) ---- */
    .mob-nav-label {
        font-size: 0.6rem;
        font-weight: 600;
        color: #888;
        opacity: 1;
        max-height: 16px;
        overflow: hidden;
        white-space: nowrap;
        text-align: center;
        line-height: 1;
        transition: font-size 0.25s ease, opacity 0.25s ease,
                    max-height 0.25s ease, color 0.25s ease;
    }

    .mob-bottom-nav.expanded .mob-nav-label {
        font-size: 0.68rem;
        opacity: 1;
        max-height: 18px;
        color: rgba(255, 255, 255, 0.75);
    }

    /* ---- Center mic item — slightly larger flex share ---- */
    .mob-nav-center {
        flex: 1.2;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: default;
    }

    .mob-mic-wrap {
        position: relative;
        width: 78px;
        height: 78px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ---- Mic button ---- */
    .mob-mic-btn {
        width: 68px;
        height: 68px;
        border-radius: 50%;
        border: none;
        background: linear-gradient(135deg, #81c408 0%, #6ba506 100%);
        color: #fff;
        font-size: 1.6rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: width 0.3s ease, height 0.3s ease, font-size 0.3s ease,
                    background 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
        box-shadow: 0 4px 20px rgba(129, 196, 8, 0.44);
        position: relative;
        z-index: 5;
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        -webkit-touch-callout: none; /* iOS: no magnifier or callout on long press */
        user-select: none;
        touch-action: none; /* prevent scroll interference during hold */
    }

    /* Expanded: mic grows a touch */
    .mob-bottom-nav.expanded .mob-mic-btn {
        width: 74px;
        height: 74px;
        font-size: 1.75rem;
        box-shadow: 0 6px 26px rgba(129, 196, 8, 0.52);
    }

    .mob-mic-btn:active {
        transform: scale(0.92);
    }

    /* Recording state: red pulse */
    .mob-mic-btn.mob-rec {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        box-shadow: 0 4px 20px rgba(231, 76, 60, 0.52);
        animation: mobMicPulse 1.1s ease-in-out infinite;
    }

    @keyframes mobMicPulse {
        0%, 100% { transform: scale(1);    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.52); }
        50%       { transform: scale(1.07); box-shadow: 0 7px 28px rgba(231, 76, 60, 0.72); }
    }

    /* Transcribing state: amber, no pointer */
    .mob-mic-btn.mob-busy {
        background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        animation: none;
        cursor: not-allowed;
    }

    /* ---- Ripple rings around mic (visible during recording) ---- */
    .mob-mic-ring {
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        border: 2px solid rgba(231, 76, 60, 0.55);
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
        pointer-events: none;
    }

    .mob-recording-active .mob-mic-ring {
        animation: mobRingExpand 2s ease-out infinite;
    }

    .mob-recording-active .r1 { width:  80px; height:  80px; animation-delay: 0s; }
    .mob-recording-active .r2 { width: 102px; height: 102px; animation-delay: 0.55s; }
    .mob-recording-active .r3 { width: 124px; height: 124px; animation-delay: 1.1s; }

    @keyframes mobRingExpand {
        0%   { opacity: 0.75; transform: translate(-50%, -50%) scale(0.78); }
        100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.38); }
    }

    /* ---- Cart badge ---- */
    .mob-cart-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: linear-gradient(135deg, #81c408, #6ba506);
        color: #fff;
        border-radius: 50%;
        min-width: 16px;
        height: 16px;
        font-size: 0.58rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 2px;
        line-height: 1;
        border: 1.5px solid #fff;
        transition: background 0.3s ease;
    }

    /* Badge stays green even in dark expanded state */
    .mob-bottom-nav.expanded .mob-cart-badge {
        border-color: rgba(18, 22, 38, 0.97);
    }

} /* end @media (max-width: 768px) for mobile bottom nav */
