/* Bottom Navigation Bar for Mobile - Floating Pill Design */
.bottom-nav-wrapper {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 380px;
    z-index: 1030;
    background: var(--primary-light, #ffffff);
    border-radius: 999px;
    box-shadow:
        0 6px 20px rgba(15, 23, 42, 0.1),
        0 1px 4px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: none;
    padding: 4px 6px;
}

@media (max-width: 768px) {
    .bottom-nav-wrapper {
        display: block;
        background: var(--primary-light, #ffffff) !important;
    }

    /* Action buttons elevated above the compact nav */
    .sticky-add-to-cart {
        display: flex;
        justify-content: center;
        position: fixed;
        bottom: 58px !important;
        left: 0;
        right: 0;
        z-index: 1040;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        margin: 0 !important;
        box-shadow: none;
        border: none;
        pointer-events: none;
    }

    .sticky-cart-btn {
        pointer-events: auto;
        font-size: 0.85rem !important;
        border-radius: 50px !important;
        font-weight: 700 !important;
        padding: 0.6rem 1.75rem !important;
        width: auto !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        transition: all 0.2s ease;
    }

    .sticky-cart-btn:active {
        transform: scale(0.98);
    }

    .sticky-cart-btn:hover:not(:disabled) {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
        color: white !important;
    }

    .sticky-cart-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    gap: 2px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    color: var(--text-light, #64748b);
    text-decoration: none;
    background: transparent;
    border: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover,
.bottom-nav-item:hover i,
.bottom-nav-item:hover .bottom-nav-label {
    color: var(--accent-blue, #4d6a92) !important;
}

.bottom-nav-item i {
    font-size: 0.85rem;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Label always visible below icon */
.bottom-nav-item .bottom-nav-label {
    display: block;
    font-size: 0.55rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

/* Active State - soft brand-tinted squircle (screenshot style) */
.bottom-nav-item.active {
    background: color-mix(in srgb, var(--banner-accent, #E76F2E) 14%, #ffffff);
    color: var(--text-dark, #0f172a);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--banner-accent, #E76F2E) 10%, transparent);
}

.bottom-nav-item.active i,
.bottom-nav-item.active .bottom-nav-label {
    color: var(--text-dark, #0f172a);
}

.bottom-nav-item.active i {
    transform: scale(1.05);
}

.bottom-nav-item.active .bottom-nav-label {
    font-weight: 600;
}

/* Fallback when color-mix is unavailable */
@supports not (background: color-mix(in srgb, #E76F2E 14%, #ffffff)) {
    .bottom-nav-item.active {
        background: #f8e2d6;
        box-shadow: inset 0 0 0 1px rgba(231, 111, 46, 0.1);
    }
}

/* Cart Badge */
.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--banner-accent, #E76F2E);
    color: var(--primary-light, #ffffff);
    font-size: 7px;
    font-weight: 700;
    min-width: 13px;
    height: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    border: 1.5px solid var(--primary-light, #ffffff);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.bottom-nav-item.active .cart-badge {
    background: var(--accent-blue, #4d6a92);
}

/* Tooltip (labels are always visible) */
.bottom-nav-tooltip {
    display: none !important;
}
